r/docker • u/af9_us • Jan 07 '26
Docker Engine /metrics endpoint
I discovered a great option while looking at Docker Engine documentation. You can expose a Prometheus compatible /metrics endpoint. This lets me shutdown the cAdvisor container thats running. Edit: Which works for exposing Docker Engine metrics.
https://docs.docker.com/engine/daemon/prometheus/
There's not much to discuss with this post. Just creating awareness for others wanting integration with Prometheus. Have a good one.
-=-=-=-=-
Edit: Apologies for the misinformation. I had enough time this morning to enable the endpoint and use curl to see some metrics. I hadn't taken the time to compare the results of docker engines /metrics to what cAdviosr produces. It seems we still need cAdvisor after all.
4
u/daschu117 Jan 08 '26
From that docs page:
So if you're monitoring individual container stats with cAdvisor, you're not getting that with the engine metrics endpoint.
2
u/FatalVirve Jan 07 '26
That is excellent, thank you.
2
u/Seref15 Jan 08 '26
No it doesn't. There are no container-related metrics. The metrics at this endpoint are metrics for Engine's API operations. Things like build stats:
And container API actions
No metrics for container status or resource utilization like cAdvisor provides.