How to monitor MongoDB database performance

You can keep your MongoDB environment running smoothly by keeping a close eye on six key metrics

1 2 Page 2
Page 2 of 2


This command provides the status of a sharded cluster.

The sh.status() command displays a report of the shard configuration when executed on a mongos instance. It also provides information on the chunks in a sharded cluster. By default, it doesn’t provide the detailed information if the total number of chunks is 20 or more.

See the MongoDB documentation on sh.status() for specifics on usage.

Eyes on MongoDB

Monitoring your MongoDB database is an important part of maintaining the health and performance of your database environment. By monitoring and gathering analytics in areas such as replication lag, replica state, locking state, connections, and disk and memory utilization, you can guarantee that you keep the database up and running. Through constant vigilance you ensure that you detect issues before they become catastrophic.

You’re only as good as the tools you have to use. Percona Monitoring and Management (PMM) is an open-source platform for managing and monitoring MongoDB developed by Percona on top of open-source technology. Behind the scenes, the various graphing features use Prometheus (a popular time-series data store), Grafana (a popular visualization tool), mongodb_exporter (our MongoDB database metric exporter), and other technologies to provide database and operating system metric graphs for your database instances.

With PMM, you can graphically monitor replication lag, replica state, locking, disk and memory utilization, and connections for the MyISAM, RocksDB, and MongoRocks engines. Check out a demo here.

A technology expert with more than 20 years of expertise working with databases and technical training, Rick Golba is a solutions engineer at Percona. He specializes in helping customers understand their database issues and finding solutions to resolve them. Prior to Percona, he worked as a technical trainer for HP/Vertica.

New Tech Forum provides a venue to explore and discuss emerging enterprise technology in unprecedented depth and breadth. The selection is subjective, based on our pick of the technologies we believe to be important and of greatest interest to InfoWorld readers. InfoWorld does not accept marketing collateral for publication and reserves the right to edit all contributed content. Send all inquiries to

1 2 Page 2
Page 2 of 2