Hi all,
I have system running approx 20 docker containers. I would like to centralize the container logging. The chain is fluent bit - Loki - grafana. I’m current using the tail input plugin. The big question I have is how to get the container names in Grafana. I tried lua scripting where I get the container id’s but not their names. There must be a solution for this. Can somebody help me with this?
Thx!
c
Celalettin
12/17/2025, 1:23 PM
🤔 I checked but as far as I understand docker runtime doesn't keep that information anywhere. But what I would do pass -name flag and also use same value as environment variable to container. And using record_modifier use that environment variable to add new field. E.g.
Thanks for your reply. I switched to the input forward plugin using de fluentd log driver . This setup solves the problem as the fluentd log driver adds the container id and container name