This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
MongoDB dbstats metricset
editMongoDB dbstats metricset
editThis is the dbstats
metricset of the MongoDB module.
It requires the following privileges, which is covered by the clusterMonitor
role:
-
listDatabases
action oncluster
resource -
for each of the databases, also need
dbStats
action on thedatabase
resource
This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.
For a description of each field in the metricset, see the exported fields section.
Here is an example document generated by this metricset:
{ "@timestamp": "2017-10-12T08:05:34.853Z", "event": { "dataset": "mongodb.dbstats", "duration": 115000, "module": "mongodb" }, "metricset": { "name": "dbstats", "period": 10000 }, "mongodb": { "dbstats": { "avg_obj_size": { "bytes": 59 }, "collections": 1, "data_size": { "bytes": 59 }, "db": "admin", "file_size": {}, "index_size": { "bytes": 20480 }, "indexes": 1, "ns_size_mb": {}, "objects": 1, "storage_size": { "bytes": 20480 } } }, "service": { "address": "172.28.0.2:27017", "type": "mongodb" } }