Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chanthakim20 opened this issue Mar 27, 2024 · 3 comments
Labels

Comments

@chanthakim20
Copy link

chanthakim20 commented Mar 27, 2024

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

Copy link

github-actions bot commented Jul 1, 2024

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

@kenhys
Copy link
Contributor

kenhys commented Jul 18, 2024

It seems that https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter is the plugin what you want to apply.

Copy link

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

@github-actions github-actions bot added the stale label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants