# Metricbeat MongoDB: Report DB Stats

**URL:** <https://discuss.elastic.co/t/metricbeat-mongodb-report-db-stats/69218>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [December 15, 2016, 9:25pm UTC](https://discuss.elastic.co/t/metricbeat-mongodb-report-db-stats/69218 "2016-12-15T21:25:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottcrespo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scottcrespo/32/13430_2.png) [@scottcrespo](https://discuss.elastic.co/u/scottcrespo)\
**Post date:** [December 15, 2016, 9:25pm UTC](https://discuss.elastic.co/t/metricbeat-mongodb-report-db-stats/69218/1 "2016-12-15T21:25:45Z")

</div>

Currently, Metricbeat monitors MongoDB instances using Mongo's [serverStatus()](https://docs.mongodb.com/v3.4/reference/command/serverStatus/) report. This is the primary "data dump" of information regarding a particular Mongo instance.

In addition, Mongo has other useful reporting tools that I think the broader user base would like to leverage. For starters, I think it would be great if Metricbeat is _optionally_ capable of reporting on [db.stats()](https://docs.mongodb.com/v3.4/reference/command/dbStats/).

DB.stats() provides more granular insight into the host's resources utilized by a particular Mongo database. The fields are as follows:

"AvgObjSize": int  
"Collections": int  
"DataSize": int  
"Db": string  
"FileSize": int  
"IndexSize": int  
"Indexes": int  
"NumExtents": int  
"Objects": int  
"Ok": int  
"StorageSize": int

Db.stats() metrics are important for evaluating the host's resource usage for a particular database, and is very useful in sharding decisions/architectures.

I've currently implemented db.stats() reporting in the Community Beat, [mongobeat](https://github.com/scottcrespo/mongobeat) and would like input from the community on adding db.stats() aggregation as part of Metricbeat's [MongoDB module](https://github.com/elastic/beats/tree/master/metricbeat/module/mongodb)

If you're interested in the conversation, please refer to Mongobeat's initial [pull request](https://github.com/elastic/beats/pull/3156) which discusses db.stats() in part.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 12, 2017, 9:26pm UTC](https://discuss.elastic.co/t/metricbeat-mongodb-report-db-stats/69218/2 "2017-01-12T21:26:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
