class Fluent::OutDatadogEvent
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_datadog_event.rb, line 17 def configure(conf) super # end
emit(tag, es, chain)
click to toggle source
# File lib/fluent/plugin/out_datadog_event.rb, line 32 def emit(tag, es, chain) chain.next es.each do |time,record| record.select do |k,v| event_msg = record[k] post_event(k, event_msg) end end end
post_event(event_key, event_msg)
click to toggle source
# File lib/fluent/plugin/out_datadog_event.rb, line 42 def post_event(event_key, event_msg) dog = Dogapi::Client.new(@api_key) res = dog.emit_event(Dogapi::Event.new( "#{event_msg}", :msg_title => "#{event_key}", :date_happend => @date_happend, :priority => @priority, # :host => @host, :tags => @tags, :alert_type => @alert_type, :aggregation_key => @aggregation_key, :source_type_name => @source_type_name )) # for debug #puts "debug_out: #{@api_key} - #{event_key} - #{event_msg} - #{options} - #{@source_type_name} \n" #puts "debug_out: #{res}\n" end
shutdown()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_datadog_event.rb, line 27 def shutdown super # ... end
start()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_datadog_event.rb, line 22 def start super # ... end