PM2 module to automatically monitor vital signs of your mongodb :
- Queries, input, updates, deletes
- Number of connections
- Used memory space
- Network speed (input and output)
- Repl name and status
$ npm install pm2 -g
$ pm2 install pm2-mongodbNODE : User should have access to admin database to query statistics (see mongo doc)
ip(Defaults to127.0.0.1) IP of mongodb serverport(Defaults to27017) Port of mongodb serverusername(Defaults tonone) used for authenticationpassword(Defaults tonone) used for authenticationauthDB(Defaults tonone) used for authenticationrefresh_rate(Defaults to5000in ms): Control the refresh rate of the worker
After having installed the module you have to type :
pm2 set pm2-mongodb:
e.g:
pm2 set pm2-mongodb:refresh_rate 5000(every 5 seconds)pm2 set pm2-mongodb:ip 42.42.42.42(ip of my mongodb server)pm2 set pm2-mongodb:password "bestpasswd"(the password will be used to connect to mongo)
$ pm2 uninstall pm2-mongodbMIT