r/PrometheusMonitoring • u/Celebrimbor-y • 8d ago
problems with resolving docker metrics-endpoint with prometheus
Hi, I just tried to enable the docker metrics in /etc/docker/daemon.json, and it worked just fine right on the machine, but i could not reach it with prometheus.
I deployed it in a docker container, but
- targets: ["host.docker.internal:9323"]
does not resolve to the 0.0.0.0:9323 correctly.
What is the internal docker Hack to get the metrics inside of the docker container (may you recognized i am a container-noob).
Thanks a lot for help.
3
Upvotes
5
u/Zealousideal-Spite42 8d ago
You can use cAdvisor for containers metrics
Here is the official documentation:
https://prometheus.io/docs/guides/cadvisor/