Skip to content
Merged
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
58 changes: 29 additions & 29 deletions pipeline/inputs/fluentbit-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ description: A plugin to collect Fluent Bit metrics

# Fluent Bit metrics

Fluent Bit exposes [metrics](../../administration/monitoring.md) to let you monitor the internals of your pipeline.
The collected metrics can be processed similarly to those from the [Prometheus Node Exporter input plugin](node-exporter-metrics.md).
They can be sent to output plugins including [Prometheus Exporter](../outputs/prometheus-exporter.md), [Prometheus Remote Write](../outputs/prometheus-remote-write.md) or [OpenTelemetry](../outputs/opentelemetry.md)..
Fluent Bit exposes [metrics](../../administration/monitoring.md) to let you monitor the internals of your pipeline. The collected metrics can be processed similarly to those from the [Prometheus Node Exporter input plugin](node-exporter-metrics.md). They can be sent to output plugins including [Prometheus Exporter](../outputs/prometheus-exporter.md), [Prometheus Remote Write](../outputs/prometheus-remote-write.md) or [OpenTelemetry](../outputs/opentelemetry.md).

{% hint style="info" %}

Metrics collected with Node Exporter Metrics flow through a separate pipeline from logs and current filters don't operate on top of metrics.
{ % endhint % }

{% endhint %}

## Configuration

Expand All @@ -27,9 +27,30 @@ Metrics collected with Node Exporter Metrics flow through a separate pipeline fr
In the following configuration file, the input plugin `node_exporter_metrics` collects metrics every `2` seconds and exposes them through the [Prometheus Exporter](../outputs/prometheus-exporter.md) output plugin on HTTP/TCP port `2021`.

{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
service:
flush: 1
log_level: info

pipeline:
inputs:
- name: fluentbit_metrics
tag: internal_metrics
scrape_interval: 2

outputs:
- name: prometheus_exporter
match: internal_metrics
host: 0.0.0.0
port: 2021
```

{% endtab %}
{% tab title="fluent-bit.conf" %}

```python
```text
# Fluent Bit Metrics + Prometheus Exporter
# -------------------------------------------
# The following example collects Fluent Bit metrics and exposes
Expand All @@ -56,32 +77,11 @@ In the following configuration file, the input plugin `node_exporter_metrics` co

```

{% endtab %}

{% tab title="fluent-bit.yaml" %}

```yaml
service:
flush: 1
log_level: info
pipeline:
inputs:
- name: fluentbit_metrics
tag: internal_metrics
scrape_interval: 2

outputs:
- name: prometheus_exporter
match: internal_metrics
host: 0.0.0.0
port: 2021
```

{% endtab %}
{% endtabs %}

You can test the expose of the metrics by using `curl`:

```bash
curl http://127.0.0.1:2021/metrics
```
```shell
$ curl http://127.0.0.1:2021/metrics
```