JavaScript
Switch branches/tags
Nothing to show
Clone or download
alavit-d
Latest commit c67a806 Mar 3, 2017
Permalink
Failed to load latest commit information.
lib/stats 1.0.0 use only npm client with metrics/s + fix #10 Oct 5, 2016
pres (fix) updated pic Mar 3, 2017
.gitignore first commit Sep 2, 2015
README.md Update README.md Jan 22, 2017
app.js (fix) updated pic Mar 3, 2017
package.json (fix) updated pic Mar 3, 2017

README.md

Description

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

pm2-mongodb

Install

$ npm install pm2 -g

$ pm2 install pm2-mongodb

Configuration

NODE : User should have access to admin database to query statistics (see mongo doc)

  • ip (Defaults to 127.0.0.1) IP of mongodb server
  • port (Defaults to 27017) Port of mongodb server
  • username (Defaults to none) used for authentication
  • password (Defaults to none) used for authentication
  • authDB (Defaults to none) used for authentication
  • refresh_rate (Defaults to 5000 in ms): Control the refresh rate of the worker

How to set these values ?

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)

Uninstall

$ pm2 uninstall pm2-mongodb

License

MIT