fluent / fluentd-kubernetes-daemonset

Fluentd daemonset for Kubernetes and it Docker image
Apache License 2.0
1.25k stars 981 forks source link

Kubernetes attribute is missing in cloudwatch logs when fluentd read application logs from files system different from /var/log/containers/ #1489

Open chanthakim20 opened 3 months ago

chanthakim20 commented 3 months ago

Describe the bug

My application logs was written to file system and then in Fluentd configMap, we changed the source file location to a different directory from /var/log/containers;

Fluentd reads from files system for example /var/mylogs/*.log and writes logs to CloudWatch without adding kubernetes attribute

Currently I am using Fluentd to cloudwatch plugin: v1.16.2-debian-cloudwatch-1.0.

Please advise if there is a way to have kubernetes attribute by updating Fluentd configuration.

This is an example when the application write logs to standard output inside /var/log/containers/.log; but when Fluentd read the logs from /var/mylogs/.log, it doesn't include kubernetes attribute.

No response

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days