Class: Fluent::IdobataOutput

Inherits:
Output
  • Object
show all
Defined in:
lib/fluent/plugin/out_idobata.rb

Instance Method Summary collapse

Constructor Details

#initializeIdobataOutput

Returns a new instance of IdobataOutput.



8
9
10
# File 'lib/fluent/plugin/out_idobata.rb', line 8

def initialize
  super
end

Instance Method Details

#configure(conf) ⇒ Object



15
16
17
18
19
# File 'lib/fluent/plugin/out_idobata.rb', line 15

def configure(conf)
  super

  @erb = ERB.new(@message_template)
end

#emit(tag, es, chain) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/fluent/plugin/out_idobata.rb', line 31

def emit(tag, es, chain)
  es.each {|time,record|
    HTTParty.post(@webhook_url, :body => "body=#{@erb.result(binding)}")
  }

  chain.next
end

#shutdownObject



26
27
28
29
# File 'lib/fluent/plugin/out_idobata.rb', line 26

def shutdown
  super

end

#startObject



21
22
23
24
# File 'lib/fluent/plugin/out_idobata.rb', line 21

def start
  super

end