PMM > MongoDB > Collections is not gathering Collections information from MongoDB

Description:

MongoDB Collections metrics are not being collected in PMM (Percona Monitoring and Management) dashboard. While other MongoDB metrics (
connections, operations, memory usage) are successfully collected and displayed, the Collections Overview dashboard shows no data.

Steps to Reproduce:

  1. Access PMM dashboard at https://pmm.xxxx.share.rnd.aws.xxxxxxxxxxxxx.net
  2. Navigate to MongoDB Collections Overview dashboard: https://pmm.xxxx.share.rnd.aws.xxxxxxxxxxxxx.net/graph/d/mongodb-collections-
    overview/mongodb-collections-overview?orgId=1&refresh=1m
  3. Select cluster “tuna” from dropdown
  4. Observe that no collection metrics are displayed
  5. Verify MongoDB Exporter is running: kubectl get pods -n percona | grep mongodb-exporter-tuna
  6. Check exporter metrics:
    kubectl port-forward -n percona svc/mongodb-exporter-tuna 9216:9216 && curl localhost:9216/metrics | grep mongodb_collstatsVersion:

Versions :

• MongoDB Exporter: 0.44.0-arm64v8
• PMM Server: 2.x.x
• Kubernetes cluster: EKS rnd-sandbox-share-meks
• MongoDB clusters: cooper, one, tuna (Percona Server for MongoDB)

Logs:

MongoDB Exporter logs show no errors:
time=2025-09-10T05:59:26.175Z level=INFO source=tls_config.go:347 msg=“Listening on” address=[::]:9216
time=2025-09-10T05:59:26.181Z level=INFO source=tls_config.go:350 msg=“TLS is disabled.” http2=false address=[::]:9216

Current exporter configuration:
yaml
args:

  • “–mongodb.uri=$(MONGODB_URI)”
  • “–collector.collstats”
  • “–collect-all”
  • “–collector.collstats-limit=1000”

Expected Result:

Collections metrics should be visible in PMM Collections Overview dashboard, showing:
• Collection count per database
• Collection size metrics
• Index statistics
• Document count per collectionActual Result:

Actual Result:

• Collections Overview dashboard shows no data
• curl localhost:9216/metrics | grep mongodb_collstats returns 0 results
• Other MongoDB metrics (connections, operations, memory) are working correctly
• MongoDB has 3 collections in jlcdocdb database confirmed by direct connection

Additional Information:

• MongoDB connection is working (verified with mongosh direct connection)
• MongoDB Exporter is successfully collecting other metrics (dbstats, replicasetstatus, etc.)
• Environment: Kubernetes namespace percona, using mongos service endpoint
• MongoDB URI:
mongodb://databaseAdmin:databaseAdmin123456@tuna-mongos.percona.svc.cluster.local:27017/?authSource=admin&directConnection=true

Hi, do you have more than 200 collections? in that case the agent won’t run collstats due to resource consumption

1 Like