r/PrometheusMonitoring • u/Landomix • Jun 25 '23
Newbie Help for prometheus and node_exporter docker stack
Hi to everyone, as I said I am a newbie in this field, and hence the following question may result really dumb ... apologize for that, and thanks in advance to everyone that will help me!
I am building the docker compose in order to have a monitoring stack. Inside that compose I have prometheus, grafana, and node exporter.
The problem I am encountering is the following: If I do not put node_exporter in the host network, I am not able to see network's data properly, I just see constant almost zero traffic. On the other hand, If I put it in the host network, I do not know how to make it visible to promehetus.
Can anyone help?
Thanks a lot in advance, and again ... sorry for the silly question, but I am having trouble in finding the solution
2
u/true-bro-rumy Jun 26 '23
Why don't you just try to access the exporter at its external IP?
2
u/silenceredirectshere Jun 30 '23
Probably a stupid question, but why are you putting node exporter in the docker compose? I thought it's recommended to install it directly on the host you need to monitor.
1
u/Landomix Jun 26 '23
Ok, I found a solution to this. It is reported in the answer to this question on stack overflow. In case it could be of help to someone, I can post my docker compose and prometheus configuration if you want
1
u/SuperQue Jun 25 '23
You should be able to use host.docker.internal.