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

in_monitor_agent renders Filter plugins #514

Merged
merged 1 commit into from Dec 16, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions lib/fluent/plugin/in_monitor_agent.rb
Expand Up @@ -228,7 +228,7 @@ def shutdown
end

MONITOR_INFO = {
'output_plugin' => 'is_a?(::Fluent::Output)',
'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',
'retry_count' => '@num_errors',
Expand All @@ -244,11 +244,14 @@ def all_plugins
Engine.root_agent.outputs.each { |o|
MonitorAgentInput.collect_children(o, array)
}
# get all filter plugins
Engine.root_agent.filters.each { |f|
MonitorAgentInput.collect_children(f, array)
}
Engine.root_agent.labels.each { |name, l|
# TODO: Add label name to outputs for identifing plugins
l.outputs.each { |o|
MonitorAgentInput.collect_children(o, array)
}
# TODO: Add label name to outputs / filters for identifing plugins
l.outputs.each { |o| MonitorAgentInput.collect_children(o, array) }
l.filters.each { |f| MonitorAgentInput.collect_children(f, array) }
}

array
Expand Down Expand Up @@ -348,6 +351,8 @@ def plugin_category(pe)
'input'.freeze
when Fluent::Output
'output'.freeze
when Fluent::Filter
'filter'.freeze
else
'unknown'.freeze
end
Expand Down