MongoDB has created a free monitoring tool in version 4.0 that runs on localhost. To use it, just connect to the database and run db.enableFreeMonitoring()
For instance:
mongo test MongoDB shell version v4.0.4 connecting to: mongodb://127.0.0.1:27017/test
After connecting, you can enable monitoring as follows:
test> db.enableFreeMonitoring() { "state": "enabled", "message": "To see your monitoring data, navigate to the unique URL below. Anyone you share the URL with will also be able to view this page. You can disable monitoring at any time by running db.disableFreeMonitoring().", "url": "https://cloud.mongodb.com/freemonitoring/cluster/HZL3ISL73QLWSNEAYMER2FGR3BINAEGJ", "userReminder": "", "ok": 1 }
Then go to the provided https://cloud.mongodb.com/freemonitoring/... ( https://cloud.mongodb.com/freemonitoring/... ).
Finally, to turn off monitoring:
test> db.disableFreeMonitoring()
source share