Skip to content

Commit 2d2eb2f

Browse files
committed
init: add docs for init_ignore_firelens_config option
Signed-off-by: Wesley Pettit <[email protected]>
1 parent 90454d1 commit 2d2eb2f

File tree

1 file changed

+34
-0
lines changed
  • use_cases/init-process-for-fluent-bit

1 file changed

+34
-0
lines changed

use_cases/init-process-for-fluent-bit/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,40 @@ You can use them as env vars directly in the Fluent Bit config.
138138
region ${AWS_REGION}
139139
```
140140
141+
### How to ignore the generated FireLens configuration?
142+
143+
Please read the [Fluent Bit Out of Memory Kill Prevention Guide](https://github.com/aws-samples/amazon-ecs-firelens-examples/tree/mainline/examples/fluent-bit/oomkill-prevention#full-firelens-configuration-examples). It discusses settings to limit the memory usage of the Fluent Bit process and enable file buffering. These settings are specified on the input definition; in [FireLens the input configuration that collects stdout logs is autogenerated](https://aws.amazon.com/blogs/containers/under-the-hood-firelens-for-amazon-ecs-tasks/) by ECS. Therefore, enabling buffer control settings requires [overriding the generated FireLens input configuration](https://aws.amazon.com/blogs/containers/how-to-set-fluentd-and-fluent-bit-input-parameters-in-firelens/).
144+
145+
The init process can help with this. Set the environment variable `aws_fluent_bit_init_ignore_firelens_config` on the container definition for the init image:
146+
147+
```
148+
"environment": [
149+
{
150+
"name": "aws_fluent_bit_init_ignore_firelens_config",
151+
"value": "true"
152+
},
153+
],
154+
```
155+
156+
And then make sure one of the configuration files specified for the init process contains an input definition like the following to collect stdout logs:
157+
158+
```
159+
[INPUT]
160+
Name forward
161+
unix_path /var/run/fluent.sock
162+
Mem_Buf_Limit 100MB
163+
```
164+
165+
```
166+
"environment": [
167+
{
168+
"name": "aws_fluent_bit_init_s3_1",
169+
"value": "arn:aws:s3:::yourBucket/inputs.conf"
170+
},
171+
],
172+
```
173+
174+
Please review the full detailed example on GitHub: [Overriding the FireLens input configuration using the init process](https://github.com/aws-samples/amazon-ecs-firelens-examples/tree/mainline/examples/fluent-bit/init-ignore-firelens)
141175
142176
143177
### How init process works?

0 commit comments

Comments
 (0)