percona / mongodb_exporter

A Prometheus exporter for MongoDB including sharding, replication and storage engines
Apache License 2.0
1.17k stars 424 forks source link

Missing Replica Set Metrics #827

Closed eroji closed 4 months ago

eroji commented 6 months ago

Describe the bug I currently have mongodb_exporter 0.40.0 installed with it connected against a replica set cluster. However, I don't see any metrics at all for replica set in the metrics endpoint. What am I missing?

To Reproduce Steps to reproduce the behavior:

  1. Install mongodb_exporter 0.40.0 with the following params for execution
    MONGODB_URI=mongodb://127.0.0.1:27017/admin
    MONGODB_USER=<user>
    MONGODB_PASSWORD=<password>
    OPTIONS="--collect-all --discovering-mode --compatible-mode"
  2. Install MongoDB 7.0 and create the exporter user
  3. Configure replica set
  4. Navigate to /metrics endpoint for mongodb_exporter

Expected behavior There should be metrics available for replica set

Logs Please provide logs relevant to the issue

Environment

Additional context Add any other context about the problem here.

du-do commented 4 months ago

i get the same issue.

/metrics get this metric :

`

HELP mongodb_up Whether MongoDB is up.

TYPE mongodb_up gauge

mongodb_up 0 `

igroene commented 4 months ago

can you double check the exporter user has enough perms?