Monitoring a MongoDB with an exporter and Prometheus running on Docker
I don’t know if this is the right place to ask these kinds of questions but we might as well try.
Specifically, each of the 4 applications runs on a docker container. All containers are connected to the same bridge network. Unfortunately the MongoDB exporter is unable to communicate with the database but I cannot understand why. I am using the Percona-maintained exporter by adding the MongoDB URI manually to the docker file as a global variable.
ENV MONGODB_URI="mongodb://10.0.100.13:27017"
Unfortunately this doesn’t seem to work. Using the curl command from a container in the same network to see the metrics collected by the exporter this doesn’t seem to see MongoDB active
curl http://10.0.100.11:9216/metrics
The MongoDB authentication settings are the default settings and are therefore disabled.
Has this problem happened to someone who can show me a possible way to solve it?
Source: Docker Questions