fluent-plugin-prometheus, a plugin for Fluentd
A fluent plugin that instruments metrics from records and exposes them via web interface. Intended to be used together with a Prometheus server.
Add this line to your application's Gemfile:
gem 'fluent-plugin-prometheus'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fluent-plugin-prometheus
fluentd-plugin-prometheus includes 6 plugins.
prometheus
input pluginprometheus_monitor
input pluginprometheus_output_monitor
input pluginprometheus_tail_monitor
input pluginprometheus
output pluginprometheus
filter plugin
See sample configuration, or try tutorial.
You have to configure this plugin to expose metrics collected by other promtheus plugins. This plugin provides a metrics HTTP endpoint to be scraped by a prometheus server on 24231/tcp(default).
With following configuration, you can access http://localhost:24231/metrics on a server where fluentd running.
<source>
@type prometheus
</source>
More configuration parameters:
bind
: binding interface (default: '0.0.0.0')port
: listen port (defaut: 24231)metrics_path
: metrics HTTP endpoint (default: /metrics)
This plugin collects internal metrics in Fluentd. The metrics are similar to/part of monitor_agent.
Current exposed metrics:
buffere_queue_length
of each BufferedOutput pluginsbuffer_total_queued_size
of each BufferedOutput pluginsretry_count
of each BufferedOutput plugins
With following configuration, those metrics are collected.