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
Add docker image name:revision attribute to journald logging driver events #21497
Comments
Have you tried |
Not a bad option @thaJeztah - I guess that would make the Container ID and the Image ID into a single attribute (eg. |
Feel free to close if there is no interest in doing this as a first class log event attribute :) |
I'm not entirely against adding them as separate properties (given that that information is already there in the context); depends a bit on how likely it is that people use this. Also when making changes to logging, performance is always important, so adding these attributes shouldn't affect performance. I'll leave it open for now, so see if there's more interest in this. |
No problem, thanks :) |
There's some work being done for other logging drivers, e.g. #25633, so possibly we can reuse once it's there |
👋 I opened the PR above to add this functionality. My company is using fluent with native docker to grab logs from containers. We have docker log to journald and then use fluentbit to forward to splunk, and using a tag as the placeholder for image names seems less than ideal. Engineers requested being able to search for log messages using a proper key for the image name, so I thought I'd help make that happen! |
Currently there is the ability to expose
env
andlabels
log-opt values for the journald log driver, to add selected environment variables and labels attached to a container to each log event.It would be nice to have the Docker image name and revision also, either by default or as a log-opt.
I suspect this will relate to gelf/fluentd similarly as per #16961
This would give the journald log driver (when combined with journalbeat) feature parity to using docker-logstash-forwarder
The text was updated successfully, but these errors were encountered: