Skip to content

Commit 7820833

Browse files
Update environment-variables-section.md
If the config file is this: ``` env: ENVIRONMENT: x INSTANCE_UID: x # Main Fluent Bit Configuration service: flush: 1 grace: 0 daemon: off log_level: debug parsers_file: parsers.yaml # Include input configurations includes: - inputs/*.yaml # Output to stdout for testing pipeline: filters: - name: modify match: "*" add: - environment ${ENVIRONMENT} - instance_uid ${INSTANCE_UID} outputs: - name: stdout match: "*" ``` If I run this with `docker run -e ENVIRONMENT=dev ...` it is still reported as "x" Signed-off-by: Colin Mollenhour <[email protected]>
1 parent a4e0583 commit 7820833

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The `env` section lets you define environment variables directly within the configuration file. These variables can then be used to dynamically replace values throughout your configuration using the `${VARIABLE_NAME}` syntax.
44

5+
**Note:** Variables set in this section cannot be overridden by system environment variables.
6+
57
Values set in the `env` section are case-sensitive. However, as a best practice, Fluent Bit recommends using uppercase names for environment variables. The following example defines two variables, `FLUSH_INTERVAL` and `STDOUT_FMT`, which can be accessed in the configuration using `${FLUSH_INTERVAL}` and `${STDOUT_FMT}`:
68

79
```yaml
@@ -35,6 +37,8 @@ Fluent Bit provides a set of predefined environment variables that can be used i
3537

3638
In addition to variables defined in the configuration file or the predefined ones, Fluent Bit can access system environment variables set in the user space. These external variables can be referenced in the configuration using the same `${VARIABLE_NAME}` pattern.
3739

40+
**Note:** Variables set in the `env` section cannot be overridden by system environment variables.
41+
3842
For example, to set the `FLUSH_INTERVAL` system environment variable to `2` and use it in your configuration:
3943

4044
```bash

0 commit comments

Comments
 (0)