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: use_cases/init-process-for-fluent-bit/README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,6 +138,40 @@ You can use them as env vars directly in the Fluent Bit config.
138
138
region ${AWS_REGION}
139
139
```
140
140
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:
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)
0 commit comments