Class: Fluent::FnordMetricOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::FnordMetricOutput
- Defined in:
- lib/fluent/plugin/out_fnordmetric.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ FnordMetricOutput
constructor
A new instance of FnordMetricOutput.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ FnordMetricOutput
Returns a new instance of FnordMetricOutput.
12 13 14 15 |
# File 'lib/fluent/plugin/out_fnordmetric.rb', line 12 def initialize require 'fnordmetric' super end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
5 6 7 |
# File 'lib/fluent/plugin/out_fnordmetric.rb', line 5 def api @api end |
Instance Method Details
#configure(conf) ⇒ Object
17 18 19 20 |
# File 'lib/fluent/plugin/out_fnordmetric.rb', line 17 def configure(conf) @api = FnordMetric::API.new(conf) super end |
#emit(tag, es, chain) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/fluent/plugin/out_fnordmetric.rb', line 31 def emit(tag, es, chain) es.each { |time,record| @api.event(:_type => tag, :info => record) } chain.next end |
#shutdown ⇒ Object
26 27 28 29 |
# File 'lib/fluent/plugin/out_fnordmetric.rb', line 26 def shutdown @api.disconnect super end |
#start ⇒ Object
22 23 24 |
# File 'lib/fluent/plugin/out_fnordmetric.rb', line 22 def start super end |