Skip to content

Commit a0cff00

Browse files
Merge branch 'master' into alexakreizinger/sc-136195/update-fluent-bit-docs-pipeline-inputs-process
Signed-off-by: Alexa Kreizinger <[email protected]>
2 parents b7eb359 + 5268681 commit a0cff00

35 files changed

+1961
-1012
lines changed

pipeline/inputs/head.md

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,31 @@ siblings : 1
4141
The CPU frequency is `cpu MHz : 2791.009`. The following configuration file gets the needed line:
4242

4343
{% tabs %}
44+
{% tab title="fluent-bit.yaml" %}
45+
46+
```yaml
47+
pipeline:
48+
inputs:
49+
- name: head
50+
tag: head.cpu
51+
file: /proc/cpuinfo
52+
lines: 8
53+
split_line: true
54+
55+
filters:
56+
- name: record_modifier
57+
match: '*'
58+
whitelist_key: line7
59+
60+
outputs:
61+
- name: stdout
62+
match: '*'
63+
```
64+
65+
{% endtab %}
4466
{% tab title="fluent-bit.conf" %}
4567
46-
```python
68+
```text
4769
[INPUT]
4870
Name head
4971
Tag head.cpu
@@ -62,34 +84,13 @@ The CPU frequency is `cpu MHz : 2791.009`. The following configuration file gets
6284
Match *
6385
```
6486

65-
{% endtab %}
66-
67-
{% tab title="fluent-bit.yaml" %}
68-
69-
```yaml
70-
pipeline:
71-
inputs:
72-
- name: head
73-
tag: head.cpu
74-
file: /proc/cpuinfo
75-
lines: 8
76-
split_line: true
77-
filters:
78-
- name: record_modifier
79-
match: '*'
80-
whitelist_key: line7
81-
outputs:
82-
- name: stdout
83-
match: '*'
84-
```
85-
8687
{% endtab %}
8788
{% endtabs %}
8889

8990
If you run the following command:
9091

91-
```bash
92-
bin/fluent-bit -c head.conf
92+
```shell
93+
$ fluent-bit -c head.conf
9394
```
9495

9596
The output is something similar to;
@@ -116,8 +117,8 @@ To read the head of a file, you can run the plugin from the command line or thro
116117

117118
The following example will read events from the `/proc/uptime` file, tag the records with the `uptime` name and flush them back to the `stdout` plugin:
118119

119-
```bash
120-
fluent-bit -i head -t uptime -p File=/proc/uptime -o stdout -m '*'
120+
```shell
121+
$ fluent-bit -i head -t uptime -p File=/proc/uptime -o stdout -m '*'
121122
```
122123

123124
The output will look similar to:
@@ -138,27 +139,9 @@ Fluent Bit v1.x.x
138139

139140
### Configuration file
140141

141-
In your main configuration file append the following `Input` and `Output` sections:
142+
In your main configuration file append the following:
142143

143144
{% tabs %}
144-
{% tab title="fluent-bit.conf" %}
145-
146-
```python
147-
[INPUT]
148-
Name head
149-
Tag uptime
150-
File /proc/uptime
151-
Buf_Size 256
152-
Interval_Sec 1
153-
Interval_NSec 0
154-
155-
[OUTPUT]
156-
Name stdout
157-
Match *
158-
```
159-
160-
{% endtab %}
161-
162145
{% tab title="fluent-bit.yaml" %}
163146

164147
```yaml
@@ -170,16 +153,34 @@ pipeline:
170153
buf_size: 256
171154
interval_sec: 1
172155
interval_nsec: 0
156+
173157
outputs:
174158
- name: stdout
175159
match: '*'
176160
```
177161
162+
{% endtab %}
163+
{% tab title="fluent-bit.conf" %}
164+
165+
```shell
166+
[INPUT]
167+
Name head
168+
Tag uptime
169+
File /proc/uptime
170+
Buf_Size 256
171+
Interval_Sec 1
172+
Interval_NSec 0
173+
174+
[OUTPUT]
175+
Name stdout
176+
Match *
177+
```
178+
178179
{% endtab %}
179180
{% endtabs %}
180181

181182
The interval is calculated like this:
182183

183184
`Total interval (sec) = Interval_Sec + (Interval_Nsec / 1000000000)`.
184185

185-
For example: `1.5s = 1s + 500000000ns`.
186+
For example: `1.5s = 1s + 500000000ns`.

pipeline/inputs/health.md

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,15 @@ To start performing the checks, you can run the plugin from the command line or
2525

2626
From the command line you can let Fluent Bit generate the checks with the following options:
2727

28-
```bash
29-
fluent-bit -i health -p host=127.0.0.1 -p port=80 -o stdout
28+
```shell
29+
$ fluent-bit -i health -p host=127.0.0.1 -p port=80 -o stdout
3030
```
3131

3232
### Configuration file
3333

34-
In your main configuration file append the following `Input` and `Output` sections:
34+
In your main configuration file append the following:
3535

3636
{% tabs %}
37-
{% tab title="fluent-bit.conf" %}
38-
39-
```python
40-
[INPUT]
41-
Name health
42-
Host 127.0.0.1
43-
Port 80
44-
Interval_Sec 1
45-
Interval_NSec 0
46-
47-
[OUTPUT]
48-
Name stdout
49-
Match *
50-
```
51-
52-
{% endtab %}
53-
5437
{% tab title="fluent-bit.yaml" %}
5538

5639
```yaml
@@ -61,33 +44,62 @@ pipeline:
6144
port: 80
6245
interval_sec: 1
6346
interval_nsec: 0
47+
6448
outputs:
6549
- name: stdout
6650
match: '*'
6751
```
6852
53+
{% endtab %}
54+
{% tab title="fluent-bit.conf" %}
55+
56+
```text
57+
[INPUT]
58+
Name health
59+
Host 127.0.0.1
60+
Port 80
61+
Interval_Sec 1
62+
Interval_NSec 0
63+
64+
[OUTPUT]
65+
Name stdout
66+
Match *
67+
```
68+
6969
{% endtab %}
7070
{% endtabs %}
7171

7272
## Testing
7373

7474
Once Fluent Bit is running, you will see some random values in the output interface similar to this:
7575

76-
```bash
76+
```shell
7777
$ fluent-bit -i health -p host=127.0.0.1 -p port=80 -o stdout
78-
Fluent Bit v1.8.0
79-
* Copyright (C) 2019-2021 The Fluent Bit Authors
80-
* Copyright (C) 2015-2018 Treasure Data
78+
79+
Fluent Bit v4.0.0
80+
* Copyright (C) 2015-2025 The Fluent Bit Authors
8181
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
8282
* https://fluentbit.io
8383

84-
[2021/06/20 08:39:47] [ info] [engine] started (pid=4621)
85-
[2021/06/20 08:39:47] [ info] [storage] version=1.1.1, initializing...
86-
[2021/06/20 08:39:47] [ info] [storage] in-memory
87-
[2021/06/20 08:39:47] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
88-
[2021/06/20 08:39:47] [ info] [sp] stream processor started
84+
______ _ _ ______ _ _ ___ _____
85+
| ___| | | | | ___ (_) | / || _ |
86+
| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
87+
| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
88+
| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
89+
\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/
90+
91+
92+
[2025/06/30 16:12:06] [ info] [fluent bit] version=4.0.0, commit=3a91b155d6, pid=91577
93+
[2025/06/30 16:12:06] [ info] [storage] ver=1.5.2, type=memory, sync=normal, checksum=off, max_chunks_up=128
94+
[2025/06/30 16:12:06] [ info] [simd ] disabled
95+
[2025/06/30 16:12:06] [ info] [cmetrics] version=0.9.9
96+
[2025/06/30 16:12:06] [ info] [ctraces ] version=0.6.2
97+
[2025/06/30 16:12:06] [ info] [input:health:health.0] initializing
98+
[2025/06/30 16:12:06] [ info] [input:health:health.0] storage_strategy='memory' (memory only)
99+
[2025/06/30 16:12:06] [ info] [sp] stream processor started
100+
[2025/06/30 16:12:06] [ info] [output:stdout:stdout.0] worker #0 started
89101
[0] health.0: [1624145988.305640385, {"alive"=>true}]
90102
[1] health.0: [1624145989.305575360, {"alive"=>true}]
91103
[2] health.0: [1624145990.306498573, {"alive"=>true}]
92104
[3] health.0: [1624145991.305595498, {"alive"=>true}]
93-
```
105+
```

0 commit comments

Comments
 (0)