The `prometheus_exporter` output plugin exposes Fluent Bit records as Prometheus metrics over HTTP. Prometheus scrapes the Fluent Bit instance at the standard `/metrics` path, letting Fluent Bit act as the serving endpoint for metrics collected or prepared elsewhere in its pipeline. section 5.6.1 section 5.6
Use this output when Prometheus should control collection on a scheduled scrape interval. This differs from remote writing: `prometheus_remote_write` sends data through Prometheus’s push-oriented API, which suits environments where Fluent Bit instances may be replaced dynamically. section 5.6 section 5.12
The plugin serves records that are already formatted as Prometheus metric records. Its main configuration choices are:
- `host` selects the network interfaces to listen on; `0.0.0.0` listens on all networks. section 5.6.1
- `port` sets the HTTP port, allowing separate Prometheus outputs to listen on different ports. section 5.6.1
- `add_label` attaches a name-value label pair to exported metrics; label names must follow Prometheus naming rules. section 5.6.1
Export node metrics on port 9885
Collect node data with `node_exporter_metrics`, then route it to `prometheus_exporter`: `[INPUT]` ` name node_exporter_metrics` ` tag node_metrics` ` scrape_interval 5` `[OUTPUT]` ` name prometheus_exporter` ` match *` ` host 0.0.0.0` ` port 9885` ` add_label fluentbit exporter` A scrape of `http://<host>:9885/metrics` returns Prometheus exposition lines such as `node_cpu_seconds_total`, with the added `fluentbit="exporter"` label.
This pattern can support separate consumers with different monitoring needs, such as infrastructure-wide server health and application-focused performance monitoring. It provides flexibility, though separate outputs should reflect a deliberate organizational design rather than become the default. section 5.6.1
