Class: Fluent::InHaproxyStats
- Inherits:
-
Input
- Object
- Input
- Fluent::InHaproxyStats
- Defined in:
- lib/fluent/plugin/in_haproxy_stats.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
-
#initialize ⇒ InHaproxyStats
constructor
A new instance of InHaproxyStats.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ InHaproxyStats
Returns a new instance of InHaproxyStats.
19 20 21 22 23 |
# File 'lib/fluent/plugin/in_haproxy_stats.rb', line 19 def initialize super # require "haproxy" end |
Instance Method Details
#configure(conf) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/fluent/plugin/in_haproxy_stats.rb', line 35 def configure(conf) super # unless File.exist?(@stats_file) or File.readable?(@stats_file) raise Fluent::ConfigError, 'HAProxy stats file does not exists or does not readable.' end end |
#shutdown ⇒ Object
30 31 32 33 |
# File 'lib/fluent/plugin/in_haproxy_stats.rb', line 30 def shutdown @finished = true @thread.join end |
#start ⇒ Object
25 26 27 28 |
# File 'lib/fluent/plugin/in_haproxy_stats.rb', line 25 def start @finished = false @thread = Thread.new(&method(:run)) end |