Class: Fluent::OsqueryInput
- Inherits:
-
Input
- Object
- Input
- Fluent::OsqueryInput
- Defined in:
- lib/fluent/plugin/in_osquery.rb
Defined Under Namespace
Classes: TimerWatcher
Instance Method Summary collapse
- #configure(conf) ⇒ Object
-
#initialize ⇒ OsqueryInput
constructor
A new instance of OsqueryInput.
- #run ⇒ Object
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ OsqueryInput
14 15 16 17 |
# File 'lib/fluent/plugin/in_osquery.rb', line 14 def initialize super require 'json' end |
Instance Method Details
#configure(conf) ⇒ Object
19 20 21 |
# File 'lib/fluent/plugin/in_osquery.rb', line 19 def configure(conf) super end |
#run ⇒ Object
36 37 38 39 40 41 |
# File 'lib/fluent/plugin/in_osquery.rb', line 36 def run @loop.run rescue => e @log.error 'unexpected error', error: e.to_s @log.error_backtrace end |
#shutdown ⇒ Object
30 31 32 33 34 |
# File 'lib/fluent/plugin/in_osquery.rb', line 30 def shutdown @tw.detach @loop.stop @thread.join end |
#start ⇒ Object
23 24 25 26 27 28 |
# File 'lib/fluent/plugin/in_osquery.rb', line 23 def start @loop = Coolio::Loop.new @tw = TimerWatcher.new(interval, true, log, &method(:execute)) @tw.attach(@loop) @thread = Thread.new(&method(:run)) end |