Skip to content

Adding YAML examples to monitoring docs. Fixes #1746. #1747

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

Merged
merged 1 commit into from
Jun 17, 2025
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
91 changes: 88 additions & 3 deletions administration/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,29 @@ To get started, enable the HTTP server from the configuration file. The followin
configuration instructs Fluent Bit to start an HTTP server on TCP port `2020` and
listen on all network interfaces:

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

```yaml
service:
http_server: on
http_listen: 0.0.0.0
http_port: 2020

pipeline:
inputs:
- name: cpu

outputs:
- name: stdout
match: '*'
```

{% endtab %}

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

```text
[SERVICE]
HTTP_Server On
HTTP_Listen 0.0.0.0
Expand All @@ -42,9 +64,16 @@ listen on all network interfaces:
Match *
```

Apply the configuration file:
{% endtab %}
{% endtabs %}

Start Fluent bit with the corresponding configuration chosen above:

```shell
# For YAML configuration.
bin/fluent-bit -c fluent-bit.conf

# For classic configuration.
bin/fluent-bit -c fluent-bit.conf
```

Expand Down Expand Up @@ -308,6 +337,30 @@ section can get an _alias_ that will be used as the parent name for the metric.
The following example sets an alias to the `INPUT` section of the configuration file,
which is using the [CPU](../pipeline/inputs/cpu-metrics.md) input plugin:

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

```yaml
service:
http_server: on
http_listen: 0.0.0.0
http_port: 2020

pipeline:
inputs:
- name: cpu
alias: server1_cpu

outputs:
- name: stdout
alias: raw_output
match: '*'
```

{% endtab %}

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

```yaml
[SERVICE]
HTTP_Server On
Expand All @@ -324,6 +377,9 @@ which is using the [CPU](../pipeline/inputs/cpu-metrics.md) input plugin:
Match *
```

{% endtab %}
{% endtabs %}

When querying the related metrics, the aliases are returned instead of the plugin
name:

Expand Down Expand Up @@ -398,7 +454,33 @@ the HC_Period interval
The `HC_Errors_Count` and `HC_Retry_Failure_Count` only count for output plugins and
count a sum for errors and retry failures from all running output plugins.

The following configuration file example shows how to define these settings:
The following configuration examples show how to define these settings:

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

```yaml
service:
http_server: on
http_listen: 0.0.0.0
http_port: 2020
health_check: on
hc_errors_count: 5
hc_retry_failure_count: 5
hc_period: 5

pipeline:
inputs:
- name: cpu

outputs:
- name: stdout
match: '*'
```

{% endtab %}

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

```yaml
[SERVICE]
Expand All @@ -418,6 +500,9 @@ The following configuration file example shows how to define these settings:
Match *
```

{% endtab %}
{% endtabs %}

Use the following command to call the health endpoint:

```bash
Expand All @@ -437,4 +522,4 @@ Health status = (HC_Errors_Count > 5) OR (HC_Retry_Failure_Count > 5) IN 5 secon

[Telemetry Pipeline](https://chronosphere.io/platform/telemetry-pipeline/) is a
hosted service that lets you monitor your Fluent Bit agents including data flow,
metrics, and configurations.
metrics, and configurations.