Prometheus database and collection metrics
We checked the Prometheus metrics provided by MongoDB Atlas and didn't find metrics for the following:
Database size
Collection storage size
Record per collection
Indexes per collection
Index size
We would like to have this kind of metrics to add to dashboards.
-
Fulton Byrne commented
Doing this without impacting performance is critical.
For example: record per collection can be a full DB count. Doing that every collection period would be bad from what I remember.
-
Luke Elliott commented
It is *almost* possible to setup an Enterprise MongoDB Cluster that is on par with a Community cluster solution. There is unfortunately a lack of parity between the Official MongoDB Metrics Exporter vs Percona third party metrics exporter that is used with community cluster. This makes it challenging to build and deploy a fully supported enterprise cluster that integrates with an existing monitoring stack.
Unfortunately, Ops-Manager also can not alert on these missing metrics independently or even visualize time-series intelligence on these metrics. Requiring a custom solution to constantly check items, like dbStats for instance, to identify DB growth that may required action.
The following metrics are missing from official solution:
* Total DB size (sum of size of all individual DBs)
* individual DB size history
* total indexes
* indexes per DB
* oplog size
* oplog length and replication lag
* total cache evictions -
Danny commented
We've run into another use case leveraging the Prometheus integration for Ops Manager to integrate with Grafana and noticed that there are some metrics missing compared to the Percona metrics exporter.
More specifically, the metrics from dbStats does not seem to be available for the Prometheus integrator, as well as these following metrics:
- Total DB size (sum of size of all individual DBs)
- Individual DB size history
- Total indexes
- Indexes per DB
- oplog size: mongodb_mongod_replset_oplog_size_bytes
- oplog length and replication lag - mongodb_mongod_replset_oplog_head_timestamp
- total cache evictions - mongodb_mongod_wiredtiger_cache_evicted_total