@@ -28,7 +28,29 @@ To get started, enable the HTTP server from the configuration file. The followin
28
28
configuration instructs Fluent Bit to start an HTTP server on TCP port ` 2020 ` and
29
29
listen on all network interfaces:
30
30
31
+ {% tabs %}
32
+ {% tab title="fluent-bit.yaml" %}
33
+
31
34
``` 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
32
54
[SERVICE]
33
55
HTTP_Server On
34
56
HTTP_Listen 0.0.0.0
@@ -42,9 +64,16 @@ listen on all network interfaces:
42
64
Match *
43
65
```
44
66
45
- Apply the configuration file:
67
+ {% endtab %}
68
+ {% endtabs %}
69
+
70
+ Start Fluent bit with the corresponding configuration chosen above:
46
71
47
72
``` shell
73
+ # For YAML configuration.
74
+ bin/fluent-bit -c fluent-bit.conf
75
+
76
+ # For classic configuration.
48
77
bin/fluent-bit -c fluent-bit.conf
49
78
```
50
79
@@ -308,6 +337,30 @@ section can get an _alias_ that will be used as the parent name for the metric.
308
337
The following example sets an alias to the ` INPUT ` section of the configuration file,
309
338
which is using the [ CPU] ( ../pipeline/inputs/cpu-metrics.md ) input plugin:
310
339
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
+
311
364
` ` ` yaml
312
365
[SERVICE]
313
366
HTTP_Server On
@@ -324,6 +377,9 @@ which is using the [CPU](../pipeline/inputs/cpu-metrics.md) input plugin:
324
377
Match *
325
378
```
326
379
380
+ {% endtab %}
381
+ {% endtabs %}
382
+
327
383
When querying the related metrics, the aliases are returned instead of the plugin
328
384
name:
329
385
@@ -398,7 +454,33 @@ the HC_Period interval
398
454
The ` HC_Errors_Count ` and ` HC_Retry_Failure_Count ` only count for output plugins and
399
455
count a sum for errors and retry failures from all running output plugins.
400
456
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" %}
402
484
403
485
` ` ` yaml
404
486
[SERVICE]
@@ -418,6 +500,9 @@ The following configuration file example shows how to define these settings:
418
500
Match *
419
501
```
420
502
503
+ {% endtab %}
504
+ {% endtabs %}
505
+
421
506
Use the following command to call the health endpoint:
422
507
423
508
``` bash
@@ -437,4 +522,4 @@ Health status = (HC_Errors_Count > 5) OR (HC_Retry_Failure_Count > 5) IN 5 secon
437
522
438
523
[ Telemetry Pipeline] ( https://chronosphere.io/platform/telemetry-pipeline/ ) is a
439
524
hosted service that lets you monitor your Fluent Bit agents including data flow,
440
- metrics, and configurations.
525
+ metrics, and configurations.
0 commit comments