Skip to content

Commit 9355c7c

Browse files
authored
Adding YAML examples to monitoring docs. Fixes #1746. (#1747)
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent d3f0c96 commit 9355c7c

File tree

1 file changed

+88
-3
lines changed

1 file changed

+88
-3
lines changed

administration/monitoring.md

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,29 @@ To get started, enable the HTTP server from the configuration file. The followin
2828
configuration instructs Fluent Bit to start an HTTP server on TCP port `2020` and
2929
listen on all network interfaces:
3030

31+
{% tabs %}
32+
{% tab title="fluent-bit.yaml" %}
33+
3134
```yaml
35+
service:
36+
http_server: on
37+
http_listen: 0.0.0.0
38+
http_port: 2020
39+
40+
pipeline:
41+
inputs:
42+
- name: cpu
43+
44+
outputs:
45+
- name: stdout
46+
match: '*'
47+
```
48+
49+
{% endtab %}
50+
51+
{% tab title="fluent-bit.conf" %}
52+
53+
```text
3254
[SERVICE]
3355
HTTP_Server On
3456
HTTP_Listen 0.0.0.0
@@ -42,9 +64,16 @@ listen on all network interfaces:
4264
Match *
4365
```
4466

45-
Apply the configuration file:
67+
{% endtab %}
68+
{% endtabs %}
69+
70+
Start Fluent bit with the corresponding configuration chosen above:
4671

4772
```shell
73+
# For YAML configuration.
74+
bin/fluent-bit -c fluent-bit.conf
75+
76+
# For classic configuration.
4877
bin/fluent-bit -c fluent-bit.conf
4978
```
5079

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

340+
{% tabs %}
341+
{% tab title="fluent-bit.yaml" %}
342+
343+
```yaml
344+
service:
345+
http_server: on
346+
http_listen: 0.0.0.0
347+
http_port: 2020
348+
349+
pipeline:
350+
inputs:
351+
- name: cpu
352+
alias: server1_cpu
353+
354+
outputs:
355+
- name: stdout
356+
alias: raw_output
357+
match: '*'
358+
```
359+
360+
{% endtab %}
361+
362+
{% tab title="fluent-bit.conf" %}
363+
311364
```yaml
312365
[SERVICE]
313366
HTTP_Server On
@@ -324,6 +377,9 @@ which is using the [CPU](../pipeline/inputs/cpu-metrics.md) input plugin:
324377
Match *
325378
```
326379

380+
{% endtab %}
381+
{% endtabs %}
382+
327383
When querying the related metrics, the aliases are returned instead of the plugin
328384
name:
329385

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

401-
The following configuration file example shows how to define these settings:
457+
The following configuration examples show how to define these settings:
458+
459+
{% tabs %}
460+
{% tab title="fluent-bit.yaml" %}
461+
462+
```yaml
463+
service:
464+
http_server: on
465+
http_listen: 0.0.0.0
466+
http_port: 2020
467+
health_check: on
468+
hc_errors_count: 5
469+
hc_retry_failure_count: 5
470+
hc_period: 5
471+
472+
pipeline:
473+
inputs:
474+
- name: cpu
475+
476+
outputs:
477+
- name: stdout
478+
match: '*'
479+
```
480+
481+
{% endtab %}
482+
483+
{% tab title="fluent-bit.conf" %}
402484
403485
```yaml
404486
[SERVICE]
@@ -418,6 +500,9 @@ The following configuration file example shows how to define these settings:
418500
Match *
419501
```
420502

503+
{% endtab %}
504+
{% endtabs %}
505+
421506
Use the following command to call the health endpoint:
422507

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

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

0 commit comments

Comments
 (0)