Fluent Bit Metrics
A plugin to collect Fluent Bit's own metrics
Fluent Bit exposes its own metrics to allow you to monitor the internals of your pipeline. The collected metrics can be processed similarly to those from the Prometheus Node Exporter input plugin. They can be sent to output plugins including Prometheus Exporter, Prometheus Remote Write or OpenTelemetry..
Important note: Metrics collected with Node Exporter Metrics flow through a separate pipeline from logs and current filters do not operate on top of metrics.

Configuration

Key
Description
Default
scrape_interval
The rate at which metrics are collected from the host operating system
2 seconds
scrape_on_start
Scrape metrics upon start, useful to avoid waiting for 'scrape_interval' for the first round of metrics.
false

Getting Started

Simple Configuration File

In the following configuration file, the input plugin _node_exporter_metrics collects _metrics every 2 seconds and exposes them through our Prometheus Exporter output plugin on HTTP/TCP port 2021.
1
# Fluent Bit Metrics + Prometheus Exporter
2
# -------------------------------------------
3
# The following example collects Fluent Bit metrics and exposes
4
# them through a Prometheus HTTP end-point.
5
#
6
# After starting the service try it with:
7
#
8
# $ curl http://127.0.0.1:2021/metrics
9
#
10
[SERVICE]
11
flush 1
12
log_level info
13
14
[INPUT]
15
name fluentbit_metrics
16
tag internal_metrics
17
scrape_interval 2
18
19
[OUTPUT]
20
name prometheus_exporter
21
match internal_metrics
22
host 0.0.0.0
23
port 2021
Copied!
You can test the expose of the metrics by using curl:
1
curl http://127.0.0.1:2021/metrics
Copied!
Last modified 3mo ago