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/backpressure.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,19 +58,23 @@ In a few seconds, if the scheduler was able to flush the initial 700 KB of
58
58
59
59
If one or more active input plugins use [filesystem buffering](../pipeline/buffering.md#filesystem-buffering-hybrid), use the following settings to manage backpressure.
60
60
61
-
### Set `storage.max_chunks_up`and `storage.backlog.mem_limit`in global settings
61
+
### Set `storage.max_chunks_up` in global settings
62
62
63
-
In the [`service` section](../administration/configuring-fluent-bit/yaml/service-section.md) of your Fluent Bit configuration file, you can configure the `storage.max_chunks_up`and `storage.backlog.mem_limit` settings. Both settings dictate how much data can be buffered to memory by input plugins that use filesystem buffering, and are combined limits shared by all applicable input plugins.
63
+
In the [`service` section](../administration/configuring-fluent-bit/yaml/service-section.md) of your Fluent Bit configuration file, you can configure the `storage.max_chunks_up`setting. This setting is a global cap on how many filesystem-backed chunks can be `up` (mapped into memory) at any time, and is shared across all input plugins that use filesystem buffering.
64
64
65
65
{% hint style="info" %}
66
-
These settings don't affect how much data can be buffered to memory by plugins that use memory-only buffering.
66
+
This setting doesn't affect how much data can be buffered to memory by plugins that use memory-only buffering.
67
67
{% endhint %}
68
68
69
-
When either the specified `storage.max_chunks_up` or `storage.backlog.mem_limit` capacity is reached, all input plugins that use filesystem buffering will stop buffering data to memory until more memory becomes available. Whether these input plugins continue buffering data to the filesystem depends on each plugin's specified `storage.pause_on_chunks_overlimit` value.
69
+
When the `storage.max_chunks_up` capacity is reached, input plugins that use filesystem buffering stop bringing new chunks up into memory. Whether these input plugins continue buffering data to the filesystem depends on each plugin's specified `storage.pause_on_chunks_overlimit` value.
70
+
71
+
### Tune `storage.backlog.mem_limit` for the backlog plugin
72
+
73
+
`storage.backlog.mem_limit` only governs the built-in `storage_backlog` input plugin, which promotes filesystem chunks left over from a previous Fluent Bit run back into memory so output plugins can flush them. While the up chunks owned by `storage_backlog` consume less memory than this limit, Fluent Bit continues to promote additional backlog chunks. Reaching this limit doesn't pause regular input plugins, and the limit doesn't cap memory used by inputs other than `storage_backlog`.
70
74
71
75
### Set `storage.pause_on_chunks_overlimit` for input plugins
72
76
73
-
For input plugins that use filesystem buffering, you can configure the `storage.pause_on_chunks_overlimit` setting to specify how each plugin should behave after the global `storage.max_chunks_up`or `storage.backlog.mem_limit`capacity is reached.
77
+
For input plugins that use filesystem buffering, you can configure the `storage.pause_on_chunks_overlimit` setting to specify how each plugin should behave after the global `storage.max_chunks_up` capacity is reached.
74
78
75
79
If `storage.pause_on_chunks_overlimit` is set to `off` for an input plugin, the input plugin will stop buffering data to memory but continue buffering data to the filesystem.
Copy file name to clipboardExpand all lines: administration/configuring-fluent-bit/classic-mode/configuration-file.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,8 @@ The `INPUT` section defines a source (related to an input plugin). Each [input p
62
62
63
63
`Name` is mandatory and tells Fluent Bit which input plugin to load. `Tag` is mandatory for all plugins except for the `input forward` plugin, which provides dynamic tags.
64
64
65
+
There is no hard-coded limit on the number of `INPUT` sections. The practical maximum depends on available system resources such as memory and file descriptors.
66
+
65
67
### Example
66
68
67
69
The following is an example of an `INPUT` section:
@@ -85,6 +87,8 @@ The `FILTER` section defines a filter (related to an filter plugin). Each filter
85
87
86
88
`Name` is mandatory and lets Fluent Bit know which filter plugin should be loaded. `Match` or `Match_Regex` is mandatory for all plugins. If both are specified, `Match_Regex` takes precedence.
87
89
90
+
There is no hard-coded limit on the number of `FILTER` sections. The practical maximum depends on available system resources such as memory.
91
+
88
92
### Filter example
89
93
90
94
The following is an example of a `FILTER` section:
@@ -98,7 +102,7 @@ The following is an example of a `FILTER` section:
98
102
99
103
## Config output
100
104
101
-
The `OUTPUT` section specifies a destination that certain records should go to after a `Tag` match. Fluent Bit can route up to 256 `OUTPUT` plugins. The configuration supports the following keys:
105
+
The `OUTPUT` section specifies a destination that certain records should go to after a `Tag` match. The configuration supports the following keys:
102
106
103
107
| Key | Description |
104
108
| ----------- | -------------- |
@@ -107,6 +111,8 @@ The `OUTPUT` section specifies a destination that certain records should go to a
107
111
|`Match_Regex`| A regular expression to match against the tags of incoming records. Use this option if you want to use the full regular expression syntax. |
108
112
|`Log_Level`| Set the plugin's logging verbosity level. Allowed values are: `off`, `error`, `warn`, `info`, `debug`, and `trace`. Defaults to the `SERVICE` section's `Log_Level`. |
109
113
114
+
There is no hard-coded limit on the number of `OUTPUT` sections. The routing `bitmask` is dynamically sized at startup based on the number of configured output plugins. The practical maximum depends on available system resources such as memory and file descriptors.
115
+
110
116
### Output example
111
117
112
118
The following is an example of an `OUTPUT` section:
Copy file name to clipboardExpand all lines: administration/configuring-fluent-bit/yaml/environment-variables-section.md
+44-2Lines changed: 44 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,12 @@
1
1
# Environment variables
2
2
3
-
The `env` section of YAML configuration files lets you define environment variables. These variables can then be used to dynamically replace values throughout your configuration using the `${VARIABLE_NAME}` syntax.
3
+
The `env` section of YAML configuration files lets you define environment variables. These variables can then be used to dynamically replace values throughout your configuration using the `${VARIABLE_NAME}` syntax. The `env` section supports two forms: a map form for static key-value pairs and an extended list form for advanced use cases like file-backed secrets with automatic refresh.
4
4
5
-
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}`:
5
+
Values set in the `env` section are case-sensitive. However, as a best practice, Fluent Bit recommends using uppercase names for environment variables.
6
+
7
+
## Map form
8
+
9
+
The map form defines variables as key-value pairs. The following example defines two variables, `FLUSH_INTERVAL` and `STDOUT_FMT`, which can be accessed in the configuration using `${FLUSH_INTERVAL}` and `${STDOUT_FMT}`:
6
10
7
11
```yaml
8
12
env:
@@ -23,6 +27,44 @@ pipeline:
23
27
format: ${STDOUT_FMT}
24
28
```
25
29
30
+
## Extended list form
31
+
32
+
The `env` section also accepts a YAML list of entries. Each entry is a mapping with the following properties:
33
+
34
+
| Property | Required | Description |
35
+
| :------- | :------- | :---------- |
36
+
| `name` | Yes | The name of the environment variable. |
37
+
| `value` | No | An explicit value for the variable. Mutually exclusive with `uri`. |
38
+
| `uri` | No | A URI pointing to the variable's value source. Currently supports `file://` URIs (for example, `file:///run/secrets/my_secret`). The file contents are read and used as the variable's value. |
39
+
| `refresh_interval` | No | How often (in seconds) to re-read the value from the `uri` source. Only meaningful when `uri` is set. Default is `0` (read once at startup). |
40
+
41
+
Either `value` or `uri` must be provided for each entry.
42
+
43
+
When `uri` and `refresh_interval` are both set, Fluent Bit re-reads the file at the specified interval. This enables dynamic configuration values, such as rotating secrets, without restarting Fluent Bit. If `refresh_interval` is `0` or omitted, the file is read only once at startup.
44
+
45
+
```yaml
46
+
env:
47
+
- name: DB_PASSWORD
48
+
uri: file:///run/secrets/db_password
49
+
refresh_interval: 60
50
+
- name: REGION
51
+
value: us-east-1
52
+
53
+
service:
54
+
flush: 1
55
+
log_level: info
56
+
57
+
pipeline:
58
+
inputs:
59
+
- name: random
60
+
61
+
outputs:
62
+
- name: stdout
63
+
match: '*'
64
+
```
65
+
66
+
In this example, `${DB_PASSWORD}` is read from the file `/run/secrets/db_password` and refreshed every 60 seconds. `${REGION}` is set to the static value `us-east-1`.
67
+
26
68
## Predefined variables
27
69
28
70
Fluent Bit supports the following predefined environment variables. You can reference these variables in configuration files without defining them in the `env` section.
Copy file name to clipboardExpand all lines: administration/configuring-fluent-bit/yaml/pipeline-section.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,8 @@ The `inputs` section defines one or more [input plugins](../../../pipeline/input
77
77
78
78
The `name` parameter is required and defines for Fluent Bit which input plugin should be loaded. The `tag` parameter is required for all plugins except for the `forward` plugin, which provides dynamic tags.
79
79
80
+
There is no hard-coded limit on the number of input plugins. The practical maximum depends on available system resources such as memory and file descriptors.
81
+
80
82
### Shared HTTP listener settings for inputs
81
83
82
84
Some HTTP-based input plugins share the same listener implementation and support the following common settings in addition to their plugin-specific parameters:
@@ -144,6 +146,8 @@ The `filters` section defines one or more [filters](../../../pipeline/filters.md
144
146
145
147
The `name` parameter is required and lets Fluent Bit know which filter should be loaded. One of either the `match` or `match_regex` parameters is required. If both are specified, `match_regex` takes precedence.
146
148
149
+
There is no hard-coded limit on the number of filter plugins. The practical maximum depends on available system resources such as memory.
150
+
147
151
### Example filter configuration
148
152
149
153
The following is an example of a `filters` section that contains a `grep` plugin:
@@ -168,7 +172,7 @@ The `outputs` section defines one or more [output plugins](../../../pipeline/out
168
172
| `match_regex` | A regular expression to match against the tags of incoming records. Use this option if you want to use the full regular expression syntax. |
169
173
| `log_level` | Set the plugin's logging verbosity level. Allowed values are: `off`, `error`, `warn`, `info`, `debug`, and `trace`. The output log level defaults to the `service` section's `log_level`. |
170
174
171
-
Fluent Bit can route up to 256 output plugins.
175
+
Fluent Bit has no hard-coded limit on the number of output plugins. The routing `bitmask` is dynamically sized at startup based on the number of configured output plugins. The practical maximum depends on available system resources such as memory and file descriptors.
Copy file name to clipboardExpand all lines: administration/configuring-fluent-bit/yaml/service-section.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ The following storage-related keys can be set as children to the `storage` key:
45
45
| Key | Description | Default Value |
46
46
| --- | ----------- | ------------- |
47
47
|`storage.backlog.flush_on_shutdown`| If enabled, Fluent Bit attempts to flush all backlog filesystem chunks to their destination during the shutdown process. This can help ensure data delivery before Fluent Bit stops, but can also increase shutdown time. Possible values: `off` or `on`. |`off`|
48
-
|`storage.backlog.mem_limit`| Sets the memory allocated for storing buffered data for input plugins that use filesystem storage. |`5M`|
48
+
|`storage.backlog.mem_limit`| Sets the memory limit used by the `storage_backlog` input plugin when promoting backlog chunks (filesystem chunks left over from a previous Fluent Bit run) back into memory so they can be flushed by output plugins. While the up chunks owned by `storage_backlog` consume less memory than this limit, Fluent Bit continues to promote additional backlog chunks. This setting doesn't cap memory use for other input plugins that use filesystem storage. |`5M`|
49
49
|`storage.checksum`| Enables data integrity check when writing and reading data from the filesystem. The storage layer uses the CRC32 algorithm. Possible values: `off` or `on`. |`off`|
50
50
|`storage.delete_irrecoverable_chunks`| If enabled, deletes irrecoverable chunks during runtime and at startup. Possible values: `off` or `on`. |`off`|
51
51
|`storage.inherit`| If enabled, input plugins that don't explicitly set `storage.type` will inherit the global `storage.type` value. Possible values: `off` or `on`. |`off`|
0 commit comments