Skip to content

Commit 6f510c3

Browse files
authored
General code example cleanup where wrong code type specified in code blocks throughout entire docs project. Fixes #2020. (#2021)
* Standardizing shell usage in stream processing hands-on doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation linux raspbeerry-pi doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation linux rh-centos doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation linux ubuntu doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation linux alma-rocky doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation linux amazon linux doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation linux debian doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation source macos doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation aws container doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage and added yaml code example to development golang output plugin doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage to developement msgpack format doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in admin networking doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation sources build and install doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation soruces download doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation soruces build with static config doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation local testing logging pipeline doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in admin transport security doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in admin config classic mode variables doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in admin config yaml env var section doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation upgrade notes doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in installation windows doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in admin config classic mode config file doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in admin config classic mode format schema doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in admin config classic mode upstream servers doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in admin config multiline parsing doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in inputs exec plugin doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> * Standardizing shell usage in inputs standard input plugin doc. Part of issue #2020. Signed-off-by: Eric D. Schabell <[email protected]> --------- Signed-off-by: Eric D. Schabell <[email protected]>
1 parent a372869 commit 6f510c3

27 files changed

+518
-436
lines changed

administration/configuring-fluent-bit/classic-mode/configuration-file.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Configuration file
22

3-
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=5e67142e-3887-4b56-b940-18494bcc23a7" />
4-
53
One of the ways to configure Fluent Bit is using a main configuration file. Fluent Bit allows the use one configuration file that works at a global scope and uses the defined [Format and Schema](format-schema.md).
64

75
The main configuration file supports four sections:
@@ -39,11 +37,11 @@ The `Service` section defines global properties of the service. The following ke
3937

4038
The following is an example of a `SERVICE` section:
4139

42-
```python
40+
```text
4341
[SERVICE]
44-
Flush 5
45-
Daemon off
46-
Log_Level debug
42+
Flush 5
43+
Daemon off
44+
Log_Level debug
4745
```
4846

4947
For scheduler and retry details, see [scheduling and retries](../../scheduling-and-retries.md#Scheduling-and-Retries).
@@ -64,10 +62,10 @@ The `INPUT` section defines a source (related to an input plugin). Each [input p
6462

6563
The following is an example of an `INPUT` section:
6664

67-
```python
65+
```text
6866
[INPUT]
69-
Name cpu
70-
Tag my_cpu
67+
Name cpu
68+
Tag my_cpu
7169
```
7270

7371
## Config filter
@@ -87,11 +85,11 @@ The `FILTER` section defines a filter (related to an filter plugin). Each filter
8785

8886
The following is an example of a `FILTER` section:
8987

90-
```python
88+
```text
9189
[FILTER]
92-
Name grep
93-
Match *
94-
Regex log aa
90+
Name grep
91+
Match *
92+
Regex log aa
9593
```
9694

9795
## Config output
@@ -109,29 +107,29 @@ The `OUTPUT` section specifies a destination that certain records should go to a
109107

110108
The following is an example of an `OUTPUT` section:
111109

112-
```python
110+
```text
113111
[OUTPUT]
114-
Name stdout
115-
Match my*cpu
112+
Name stdout
113+
Match my*cpu
116114
```
117115

118116
### Collecting `cpu` metrics example
119117

120118
The following configuration file example demonstrates how to collect CPU metrics and flush the results every five seconds to the standard output:
121119

122-
```python
120+
```text
123121
[SERVICE]
124-
Flush 5
125-
Daemon off
126-
Log_Level debug
122+
Flush 5
123+
Daemon off
124+
Log_Level debug
127125
128126
[INPUT]
129-
Name cpu
130-
Tag my_cpu
127+
Name cpu
128+
Tag my_cpu
131129
132130
[OUTPUT]
133-
Name stdout
134-
Match my*cpu
131+
Name stdout
132+
Match my*cpu
135133
```
136134

137135
## Config include file
@@ -156,4 +154,4 @@ Wildcard character (`*`) supports including multiple files. For example:
156154
@INCLUDE input_*.conf
157155
```
158156

159-
Files matching the wildcard character are included unsorted. If plugin ordering between files needs to be preserved, the files should be included explicitly.
157+
Files matching the wildcard character are included unsorted. If plugin ordering between files needs to be preserved, the files should be included explicitly.

administration/configuring-fluent-bit/classic-mode/format-schema.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ The schema is defined by three concepts:
1010

1111
An example of a configuration file is as follows:
1212

13-
```python
13+
```text
1414
[SERVICE]
15-
# This is a commented line
16-
Daemon off
17-
log_level debug
15+
# This is a commented line
16+
Daemon off
17+
log_level debug
1818
```
1919

2020
## Sections
@@ -42,15 +42,15 @@ Commented lines are set prefixing the `#` character. Commented lines aren't proc
4242

4343
Fluent Bit configuration files are based in a strict indented mode. Each configuration file must follow the same pattern of alignment from left to right when writing text. By default, an indentation level of four spaces from left to right is suggested. Example:
4444

45-
```python
45+
```text
4646
[FIRST_SECTION]
47-
# This is a commented line
48-
Key1 some value
49-
Key2 another value
50-
# more comments
47+
# This is a commented line
48+
Key1 some value
49+
Key2 another value
50+
# more comments
5151
5252
[SECOND_SECTION]
53-
KeyN 3.14
53+
KeyN 3.14
5454
```
5555

56-
This example shows two sections with multiple entries and comments. Empty lines are allowed.
56+
This example shows two sections with multiple entries and comments. Empty lines are allowed.

administration/configuring-fluent-bit/classic-mode/upstream-servers.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,27 @@ The following example defines an `Upstream` called forward-balancing which aims
3737
- node-2: connects to 127.0.0.1:44000
3838
- node-3: connects to 127.0.0.1:45000 using TLS without verification. It also defines a specific configuration option required by Forward output called `shared_key`.
3939

40-
```python
40+
```text
4141
[UPSTREAM]
42-
name forward-balancing
42+
name forward-balancing
4343
4444
[NODE]
45-
name node-1
46-
host 127.0.0.1
47-
port 43000
45+
name node-1
46+
host 127.0.0.1
47+
port 43000
4848
4949
[NODE]
50-
name node-2
51-
host 127.0.0.1
52-
port 44000
50+
name node-2
51+
host 127.0.0.1
52+
port 44000
5353
5454
[NODE]
55-
name node-3
56-
host 127.0.0.1
57-
port 45000
58-
tls on
59-
tls.verify off
60-
shared_key secret
55+
name node-3
56+
host 127.0.0.1
57+
port 45000
58+
tls on
59+
tls.verify off
60+
shared_key secret
6161
```
6262

63-
Every `Upstream` definition must exists in its own configuration file in the file system. Adding multiple `Upstream` configurations in the same file or different files isn't allowed.
63+
Every `Upstream` definition must exists in its own configuration file in the file system. Adding multiple `Upstream` configurations in the same file or different files isn't allowed.
Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Variables
22

3-
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=1731c7b5-34c6-424f-bfc6-88c2aa71e81f" />
4-
53
Fluent Bit supports the usage of environment variables in any value associated to a key when using a configuration file.
64

75
The variables are case sensitive and can be used in the following format:
@@ -25,37 +23,32 @@ Create the following configuration file \(`fluent-bit.conf`\):
2523

2624
```yaml
2725
[SERVICE]
28-
Flush 1
29-
Daemon Off
30-
Log_Level info
26+
Flush 1
27+
Daemon Off
28+
Log_Level info
3129

3230
[INPUT]
33-
Name cpu
34-
Tag cpu.local
31+
Name cpu
32+
Tag cpu.local
3533

3634
[OUTPUT]
37-
Name ${MY_OUTPUT}
38-
Match *
35+
Name ${MY_OUTPUT}
36+
Match *
3937
```
4038

4139
Open a terminal and set the environment variable:
4240

43-
```bash
41+
```shell
4442
export MY_OUTPUT=stdout
4543
```
4644

4745
The previous command sets the `stdout` value to the variable `MY_OUTPUT`.
4846

4947
Run Fluent Bit with the recently created configuration file:
5048

51-
```text
49+
```shell
5250
$ bin/fluent-bit -c fluent-bit.conf
53-
Fluent Bit v1.4.0
54-
* Copyright (C) 2019-2020 The Fluent Bit Authors
55-
* Copyright (C) 2015-2018 Treasure Data
56-
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
57-
* https://fluentbit.io
5851

59-
[2020/03/03 12:25:25] [ info] [engine] started
52+
...
6053
[0] cpu.local: [1491243925, {"cpu_p"=>1.750000, "user_p"=>1.750000, "system_p"=>0.000000, "cpu0.p_cpu"=>3.000000, "cpu0.p_user"=>2.000000, "cpu0.p_system"=>1.000000, "cpu1.p_cpu"=>0.000000, "cpu1.p_user"=>0.000000, "cpu1.p_system"=>0.000000, "cpu2.p_cpu"=>4.000000, "cpu2.p_user"=>4.000000, "cpu2.p_system"=>0.000000, "cpu3.p_cpu"=>1.000000, "cpu3.p_user"=>1.000000, "cpu3.p_system"=>0.000000}]
61-
```
54+
```

administration/configuring-fluent-bit/multiline-parsing.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ To simplify the configuration of regular expressions, you can use the [Rubular](
102102
The following example provides a full Fluent Bit configuration file for multiline parsing by using the definition explained previously. It's provided in following YAML and classic configuration examples:
103103

104104
{% tabs %}
105-
106105
{% tab title="fluent-bit.yaml" %}
107106

108107
This is the primary Fluent Bit YAML configuration file. It includes the `parsers_multiline.yaml` and tails the file `test.log` by applying the multiline parser `multiline-regex-test`. Then it sends the processing to the standard output.
@@ -224,7 +223,7 @@ another line...
224223

225224
By running Fluent Bit with the corresponding configuration file you will obtain the following output:
226225

227-
```text
226+
```shell
228227
# For YAML configuration.
229228
$ ./fluent-bit --config fluent-bit.yaml
230229
@@ -399,15 +398,14 @@ Dec 14 06:41:08 Exception in thread "main" java.lang.RuntimeException: Something
399398
at com.myproject.module.MyProject.someMethod(MyProject.java:10)
400399
at com.myproject.module.MyProject.main(MyProject.java:6)
401400
another line...
402-
403401
```
404402

405403
{% endtab %}
406404
{% endtabs %}
407405

408406
By running Fluent Bit with the corresponding configuration file you will obtain:
409407

410-
```text
408+
```shell
411409
# For YAML configuration.
412410
$ ./fluent-bit --config fluent-bit.yaml
413411
@@ -425,4 +423,4 @@ $ ./fluent-bit --config fluent-bit.conf
425423
"}]
426424
[2] tail.0: [[1750333602.460998000, {}], {"log"=>"another line...
427425
"}]
428-
```
426+
```

administration/configuring-fluent-bit/yaml/environment-variables-section.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Variables set in the `env` section can't be overridden by system environment var
4141

4242
For example, to set the `FLUSH_INTERVAL` system environment variable to `2` and use it in your configuration:
4343

44-
```bash
44+
```shell
4545
export FLUSH_INTERVAL=2
4646
```
4747

@@ -62,4 +62,4 @@ pipeline:
6262
format: json_lines
6363
```
6464

65-
This approach lets you manage and override configuration values using environment variables, providing flexibility in various deployment environments.
65+
This approach lets you manage and override configuration values using environment variables, providing flexibility in various deployment environments.

administration/networking.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,15 @@ pipeline:
134134

135135
In another terminal, start `nc` and make it listen for messages on TCP port 9090:
136136

137-
```text
137+
```shell
138138
nc -l 9090
139139
```
140140

141141
Start Fluent Bit with the configuration file you defined previously to see data flowing to netcat:
142142

143-
```text
143+
```shell
144144
$ nc -l 9090
145+
145146
{"date":1587769732.572266,"rand_value":9704012962543047466}
146147
{"date":1587769733.572354,"rand_value":7609018546050096989}
147148
{"date":1587769734.572388,"rand_value":17035865539257638950}

administration/transport-security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pipeline:
143143

144144
By default, the HTTP output plugin uses plain TCP. Run the following command to enable TLS:
145145

146-
```bash
146+
```shell
147147
fluent-bit -i cpu -t cpu -o http://192.168.2.3:80/something \
148148
-p tls=on \
149149
-p tls.verify=off \
@@ -317,4 +317,4 @@ This outgoing connect will fail and disconnect:
317317
[2024/06/17 16:51:31] [error] [tls] error: unexpected EOF with reason: certificate verify failed
318318
[2024/06/17 16:51:31] [debug] [upstream] connection #50 failed to other.fluent-aggregator.net:24224
319319
[2024/06/17 16:51:31] [error] [output:forward:forward.0] no upstream connections available
320-
```
320+
```

0 commit comments

Comments
 (0)