fluentd-kubernetes-daemonset icon indicating copy to clipboard operation
fluentd-kubernetes-daemonset copied to clipboard

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

Open chanthakim20 opened this issue 3 months ago • 0 comments

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

chanthakim20 avatar Mar 27 '24 19:03 chanthakim20