Skip to content

Commit 5aea241

Browse files
authored
Merge pull request #1668 from fluent/lynettemiles/sc-135599/update-fluent-bit-fluent-bit-docs-administration
2 parents 1ffb8be + fd51a8a commit 5aea241

File tree

1 file changed

+26
-19
lines changed
  • administration/configuring-fluent-bit/classic-mode

1 file changed

+26
-19
lines changed

administration/configuring-fluent-bit/classic-mode/commands.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
Configuration files must be flexible enough for any deployment need, but they must keep a clean and readable format.
44

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:
67

78
| Command | Prototype | Description |
89
| :--- | :--- | :--- |
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. |
1112

12-
## @INCLUDE Command <a id="cmd_include"></a>
13+
## `@INCLUDE` <a id="cmd_include"></a>
1314

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.
1516

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:
1718

1819
```text
1920
[SERVICE]
@@ -23,9 +24,19 @@ The @INCLUDE command allows the configuration reader to include an external conf
2324
@INCLUDE outputs.conf
2425
```
2526

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.
2728

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.
2940

3041
```text
3142
[INPUT]
@@ -40,6 +51,9 @@ The above example defines the main service configuration file and also include t
4051

4152
### outputs.conf
4253

54+
The following is an example of an `outputs.conf` file, like the one called in the
55+
previous example.
56+
4357
```text
4458
[OUTPUT]
4559
Name stdout
@@ -53,20 +67,14 @@ The above example defines the main service configuration file and also include t
5367
Logstash_Format On
5468
```
5569

56-
Note that despites the order of inclusion, Fluent Bit will **ALWAYS** respect the following order:
70+
## `@SET` <a id="cmd_set"></a>
5771

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.
6273

63-
## @SET Command <a id="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:
6875

6976
```text
77+
// DO NOT USE
7078
@SET my_input=cpu
7179
@SET my_output=stdout
7280
@@ -79,4 +87,3 @@ The @SET command can only be used at root level of each line, meaning it cannot
7987
[OUTPUT]
8088
Name ${my_output}
8189
```
82-

0 commit comments

Comments
 (0)