Class: Fluent::Plugin::InPerfTools
- Inherits:
-
Input
- Object
- Input
- Fluent::Plugin::InPerfTools
- Defined in:
- lib/fluent/plugin/in_perf_tools.rb
Constant Summary collapse
- PLUGIN_NAME =
"perf_tools"
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fluent/plugin/in_perf_tools.rb', line 22 def configure(conf) super @command = PerfTools::Command.new(command: @command, command_args: @command_args, interval: @interval) rescue StandardError => e log.error e.to_s raise Fluent::ConfigError, e end |
#start ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/fluent/plugin/in_perf_tools.rb', line 33 def start super @command.stream do |time, record| router.emit(tag, time, record) end end |