About MongoWatch
MongoWatch tracks a handful of high level statistics about one or more MongoDB instances. For those familiar with MongoDB, the idea is to have a central place to store and review historical db.serverStatus results. This information is useful in providing a high-level trending overview of your MongoDB instances.
Installation
Installation is easy. First though, you'll want to install node.js if you haven't already done so.
Step 1 - Set Things Up
» clone the repository and install the dependencies
git clone git://github.com/karlseguin/mongowatch.git cd mongowatch npm install
Step 2 - Create A User
» You might want to edit config.js to change the default port, MongoDB connection information or other settings. Take note of the key and secret which it generates
node create_user.js USERNAME PASSWORD
Step 3 - Start the Server
» Not sure how to configure a node.js app to run? howtonode has the answer. The simplest solution is:
node web/app.js
Step 4 - Deploy the Connector
» edit connectors/ruby/config.yml to include your key, secret, and the connection information of both the server you just deployed and the mongodb server(s) to check. Deploy the connector to each cluster of servers you want monitored and run it daily.
More Info
watch.demo.mongly.com is running the web application AND has 1 connector deployed for the server named linode1. The connector runs once a day via crontab:
9 2 * * * /opt/ruby/bin/ruby /opt/scripts/mongo_watch/mongo_watch.rb
The connector configuration looks like:
---
host: watch.demo.mongly.com
port: 80
key: MY KEY
secret: 'MY SECRET'
servers:
- name: linode1
port: 27017
address: 127.0.0.1
Additionally, another server, somewhere else on the internet, has a similar cron job, and is using the following configuration:
--- host: watch.demo.mongly.com port: 80 key: MY KEY secret: 'MY SECRET' servers: - name: mogade1 port: 27017 address: 192.168.1.50 - name: mogade2 port: 27017 address: 192.168.1.51