I have been using dstat for a couple of years now. As a monitoring tools, it’s probably one of the most complete one. Monitoring disk, cpu, systems, … well, the list is long ūüôā

As I am currently playing with MongoDB, I was wondering if I could use dstat to monitor my instances. Searching on the wild internet, I found one plugin for MongoDB: https://github.com/gianpaj/dstat.

For my performance tests, I updated this plugin and decided to include a few new features. If you want to have a look, the repo is available at: https://github.com/Dabz/dstat.

The features of these plugins are:

  • MongoDB operations counter (–mongodb-opcount), gathering the number of¬†query, insert, update, delete, getmore and commande.
  • MongoDB data size statistics (–mongodb-stats), gathering the data size, the index size and the actual size once compressed by wiredTriger.
  • MongoDB¬†connection ¬†counter (–mongodb-conn), gathering the number of¬†used connection and the number of available
  • MongoDB memory information (–mongodb-mem), gathering resident and virtual memory. If MMAPV1 is used,¬†journal memory and page faults are automatically added.



This plugin also support authentication. DSTAT_MONGODB_USER and DSTAT_MONGODB_PWD environment variable can be set. If a password is set, the plugins try to use them against the admin database.

The DSTAT_MONGODB_HOST (default: variable is used to connect to mongod.