Class: Fluent::IdobataOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::IdobataOutput
- Defined in:
- lib/fluent/plugin/out_idobata.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ IdobataOutput
constructor
A new instance of IdobataOutput.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ IdobataOutput
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 |
#shutdown ⇒ Object
26 27 28 29 |
# File 'lib/fluent/plugin/out_idobata.rb', line 26 def shutdown super end |
#start ⇒ Object
21 22 23 24 |
# File 'lib/fluent/plugin/out_idobata.rb', line 21 def start super end |