Class: Fluent::MuninNodeInput
- Inherits:
-
Input
- Object
- Input
- Fluent::MuninNodeInput
- Defined in:
- lib/fluent/plugin/in_munin_node.rb
Defined Under Namespace
Classes: TimerWatcher
Instance Method Summary collapse
- #configure(conf) ⇒ Object
-
#initialize ⇒ MuninNodeInput
constructor
A new instance of MuninNodeInput.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ MuninNodeInput
Returns a new instance of MuninNodeInput.
24 25 26 27 |
# File 'lib/fluent/plugin/in_munin_node.rb', line 24 def initialize super require 'munin-ruby' end |
Instance Method Details
#configure(conf) ⇒ Object
29 30 31 |
# File 'lib/fluent/plugin/in_munin_node.rb', line 29 def configure(conf) super end |
#shutdown ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/fluent/plugin/in_munin_node.rb', line 42 def shutdown @loop.watchers.each(&:detach) @loop.stop # XXX: Comment out for exit soon. Is it OK? #@thread.join end |
#start ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/fluent/plugin/in_munin_node.rb', line 33 def start super @loop = Coolio::Loop.new timer = TimerWatcher.new(@interval, true, log, &method(:fetch_items)) @loop.attach(timer) @thread = Thread.new(&method(:run)) end |