diff --git a/docs/infrastructure/components/fluentbit.md b/docs/infrastructure/components/fluentbit.md index 544563218..7380f79c4 100644 --- a/docs/infrastructure/components/fluentbit.md +++ b/docs/infrastructure/components/fluentbit.md @@ -46,7 +46,11 @@ The Fluent Bit application version is stored in `appVersion` but this is only he ## Troubleshooting -[Guide to Debugging Fluent Bit issues](https://github.com/aws/aws-for-fluent-bit/blob/mainline/troubleshooting/debugging.md) +### Resources + +- [Guide to Debugging Fluent Bit issues](https://github.com/aws/aws-for-fluent-bit/blob/mainline/troubleshooting/debugging.md) +- [2023 High Impact Issues Notice/Catalogue Ticket](https://github.com/aws/aws-for-fluent-bit/issues/542) +- [Recommended Cloudwatch_Logs Configuration](https://github.com/aws/aws-for-fluent-bit/issues/340) ### Basic checks diff --git a/infra/charts/fluentbit.ts b/infra/charts/fluentbit.ts index 5f5633aba..9121eda42 100644 --- a/infra/charts/fluentbit.ts +++ b/infra/charts/fluentbit.ts @@ -81,6 +81,12 @@ HC_Period 5 logGroupName: `/aws/eks/${props.clusterName}/logs`, logGroupTemplate: `/aws/eks/${props.clusterName}/workload/$kubernetes['namespace_name']`, logStreamPrefix: 'fb-', + /** + * Set the Fluent Bit idle timeout to 4 seconds. + * This helps reduce the rate of network errors in the logs. + * See: https://github.com/aws/aws-for-fluent-bit/issues/340 + */ + extraOutputs: `net.keepalive_idle_timeout 4s`, }, firehose: { enabled: false }, kinesis: { enabled: false }, @@ -93,11 +99,6 @@ HC_Period 5 { key: 'karpenter.sh/capacity-type', operator: 'Equal', value: 'spot', effect: 'NoSchedule' }, { key: 'kubernetes.io/arch', operator: 'Equal', value: 'arm64', effect: 'NoSchedule' }, ], - /* To reduce the log volume being sent to CloudWatch (shipped to AWS s3 => storage cost), - tells Fluent Bit to not send the logs from the Fluent Bit application pods. - The Fluent Bit application pods have some (a lot!) network errors that are being logged. - */ - annotations: { 'fluentbit.io/exclude': 'true' }, }, }); }