Cannot export docker_log metrics to prometheus

Please direct all support questsions to slack or the forums. Thank you.


Information about Setup:
Telegraf Version: 1.24.0
Installation Mode: docker
Docker Version: 20.10.17
O/S: RedHat 8.6

I’m trying to export the metrics from the inputs.docker_log plugin to my prometheus server using the outputs.prometheus_client. But I do not get a single line when I query the telegraf server on the prometheus_client URL. I get all other metrics, but not the docker_log ones.

I’m running Telegraf 1.24.0 as a Docker Container using the default image. When I login to the container running docker exec -it telegraf bash I can run the telegraf in test mode by running:

$ telegraf --test --test-wait=10 --config-directory /etc/telegraf/config

In this test mode I can see various lines starting with docker_log which represent the logs of my docker containers.

Why are these lines not send to the prometheus_client output?

Thanks and kind regards


Can you share your config? is tehre any filter or routing that might exclude those lines form the outputs?

I doubt the following will help, but you can run $ telegraf --once instead of --test, this will do one round of gathering and send the metrics to the outpost (which does not happen with --test), maybe you will get something useful out of it

1 Like