MongoDB exporter metrics from multiple mongo instance

I have multiple mongo docker containers in a replication setup. I want to scrape metrics from all three instance using mongodb exporter and prometheus. I already specified the server info in URI like this


The mongoexporter only scrape information from the first instance only(mongo-0). How to get the metrics from all three instance so I can view the details of all from a single dashboard on grafana

1 Like

Hi, you will need 3 exporters for this. Point each of them to one of the instances instead of using the replica set connection string.

1 Like