You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: administration/configuring-fluent-bit/classic-mode/commands.md
+26-19Lines changed: 26 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,19 @@
2
2
3
3
Configuration files must be flexible enough for any deployment need, but they must keep a clean and readable format.
4
4
5
-
Fluent Bit _Commands_ extends a configuration file with specific built-in features. The list of commands available as of Fluent Bit 0.12 series are:
5
+
Fluent Bit `Commands` extends a configuration file with specific built-in features.
6
+
The following commands are available:
6
7
7
8
| Command | Prototype | Description |
8
9
| :--- | :--- | :--- |
9
-
|[@INCLUDE](commands.md#cmd_include)|@INCLUDE FILE | Include a configuration file |
10
-
|[@SET](commands.md#cmd_set)|@SET KEY=VAL | Set a configuration variable |
10
+
|[`@INCLUDE`](commands.md#cmd_include)|`@INCLUDE FILE`| Include a configuration file.|
11
+
|[`@SET`](commands.md#cmd_set)|`@SET KEY=VAL`| Set a configuration variable.|
11
12
12
-
## @INCLUDE Command <aid="cmd_include"></a>
13
+
## `@INCLUDE` <aid="cmd_include"></a>
13
14
14
-
Configuring a logging pipeline might lead to an extensive configuration file. In order to maintain a human-readable configuration, it's suggested to split the configuration in multiple files.
15
+
Configuring a logging pipeline might lead to an extensive configuration file. In order to maintain a human-readable configuration, split the configuration in multiple files.
15
16
16
-
The @INCLUDE command allows the configuration reader to include an external configuration file, e.g:
17
+
The `@INCLUDE` command allows the configuration reader to include an external configuration file:
17
18
18
19
```text
19
20
[SERVICE]
@@ -23,9 +24,19 @@ The @INCLUDE command allows the configuration reader to include an external conf
23
24
@INCLUDE outputs.conf
24
25
```
25
26
26
-
The above example defines the main service configuration file and also include two files to continue the configuration:
27
+
This example defines the main service configuration file and also includes two files to continue the configuration.
27
28
28
-
### inputs.conf
29
+
Fluent Bit will respects the following order when including:
30
+
31
+
- Service
32
+
- Inputs
33
+
- Filters
34
+
- Outputs
35
+
36
+
### `inputs.conf`
37
+
38
+
The following is an example of an `inputs.conf` file, like the one called in the
39
+
previous example.
29
40
30
41
```text
31
42
[INPUT]
@@ -40,6 +51,9 @@ The above example defines the main service configuration file and also include t
40
51
41
52
### outputs.conf
42
53
54
+
The following is an example of an `outputs.conf` file, like the one called in the
55
+
previous example.
56
+
43
57
```text
44
58
[OUTPUT]
45
59
Name stdout
@@ -53,20 +67,14 @@ The above example defines the main service configuration file and also include t
53
67
Logstash_Format On
54
68
```
55
69
56
-
Note that despites the order of inclusion, Fluent Bit will **ALWAYS** respect the following order:
70
+
## `@SET` <aid="cmd_set"></a>
57
71
58
-
* Service
59
-
* Inputs
60
-
* Filters
61
-
* Outputs
72
+
Fluent Bit supports [configuration variables](variables.md). One way to expose this variables to Fluent Bit is through setting a shell environment variable, the other is through the `@SET` command.
62
73
63
-
## @SET Command <aid="cmd_set"></a>
64
-
65
-
Fluent Bit supports [configuration variables](variables.md), one way to expose this variables to Fluent Bit is through setting a Shell environment variable, the other is through the _@SET_ command.
66
-
67
-
The @SET command can only be used at root level of each line, meaning it cannot be used inside a section, e.g:
74
+
The `@SET` command can only be used at root level of each line. It can't be used inside a section:
68
75
69
76
```text
77
+
// DO NOT USE
70
78
@SET my_input=cpu
71
79
@SET my_output=stdout
72
80
@@ -79,4 +87,3 @@ The @SET command can only be used at root level of each line, meaning it cannot
0 commit comments