Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix monitor agent v14 #1003

Merged
merged 3 commits into from
May 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions example/out_forward_buf_file.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
tag test
</source>

<source>
@type monitor_agent
emit_interval 5
</source>

<match test>
@type forward
buffer_path /tmp/fluentd.forward
Expand Down
12 changes: 6 additions & 6 deletions lib/fluent/plugin/in_monitor_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}

Expand Down Expand Up @@ -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, Fluent::Plugin::BareOutput
'output'.freeze
when Fluent::Filter
when Fluent::Plugin::Filter
'filter'.freeze
else
'unknown'.freeze
Expand Down