From 147679192462d66930601c6a2ddf1bd1b9c48d88 Mon Sep 17 00:00:00 2001 From: TAGOMORI Satoshi Date: Mon, 30 May 2016 12:25:34 +0900 Subject: [PATCH 1/3] fix to read correct things from v0.14 plugins --- lib/fluent/plugin/in_monitor_agent.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fluent/plugin/in_monitor_agent.rb b/lib/fluent/plugin/in_monitor_agent.rb index c0dbd52742..e319ca8c24 100644 --- a/lib/fluent/plugin/in_monitor_agent.rb +++ b/lib/fluent/plugin/in_monitor_agent.rb @@ -297,9 +297,9 @@ def shutdown end MONITOR_INFO = { - 'output_plugin' => 'is_a?(::Fluent::Output)', # deprecated. Use plugin_category instead - 'buffer_queue_length' => '@buffer.queue_size', - 'buffer_total_queued_size' => '@buffer.total_queued_chunk_size', + 'output_plugin' => 'is_a?(::Fluent::Plugin::Output)', + 'buffer_queue_length' => '@buffer.queue.size', + 'buffer_total_queued_size' => '@buffer.stage_size + @buffer.queue_size', 'retry_count' => '@num_errors', } @@ -420,11 +420,11 @@ def get_monitor_info(pe, opts={}) def plugin_category(pe) case pe - when Fluent::Input + when Fluent::Plugin::Input 'input'.freeze - when Fluent::Output + when Fluent::Plugin::Output 'output'.freeze - when Fluent::Filter + when Fluent::Plugin::Filter 'filter'.freeze else 'unknown'.freeze From 03c41a1a10578887d09be72fda995d7f55b9ddac Mon Sep 17 00:00:00 2001 From: TAGOMORI Satoshi Date: Mon, 30 May 2016 12:25:48 +0900 Subject: [PATCH 2/3] add example configuration to test in_monitor_agent --- example/out_forward_buf_file.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/example/out_forward_buf_file.conf b/example/out_forward_buf_file.conf index 4b5fffdbb8..299506d1fe 100644 --- a/example/out_forward_buf_file.conf +++ b/example/out_forward_buf_file.conf @@ -3,6 +3,11 @@ tag test + + @type monitor_agent + emit_interval 5 + + @type forward buffer_path /tmp/fluentd.forward From 687f339bec245de6434690a988e216009053c40d Mon Sep 17 00:00:00 2001 From: TAGOMORI Satoshi Date: Mon, 30 May 2016 14:08:02 +0900 Subject: [PATCH 3/3] add BareOutput to return "output" category --- lib/fluent/plugin/in_monitor_agent.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fluent/plugin/in_monitor_agent.rb b/lib/fluent/plugin/in_monitor_agent.rb index e319ca8c24..cb371b7641 100644 --- a/lib/fluent/plugin/in_monitor_agent.rb +++ b/lib/fluent/plugin/in_monitor_agent.rb @@ -422,7 +422,7 @@ def plugin_category(pe) case pe when Fluent::Plugin::Input 'input'.freeze - when Fluent::Plugin::Output + when Fluent::Plugin::Output, Fluent::Plugin::BareOutput 'output'.freeze when Fluent::Plugin::Filter 'filter'.freeze