FourSquare is a popular website that uses MongoDB to store data. They make especially good use of MongoDB’s 2D indexes to provide geo-location features to their users. FourSquare recently had an outage and their site was unavailable for around 11 hours. Eliot Horowitz (10gen’s CTO) describes reasons for this outage and his thoughts on prevention in this post.
This instance highlighted the critical need to monitor the performance of production servers. There are a number of services available that provide monitoring of servers with the ability to store historical data and provide nice graphs and charts of key metrics including CPU, IO, Memory etc.
The new version of MongoVUE – 0.6.5, includes a simple and easy capability allowing you to monitor your MongoDB’s performance right from your desktop!
Step 1: Fire up MongoVUE. We are not going to use the “Database Explorer”, so lets unpin it. There is a new button available in the toolbar – “Monitoring”, click on this.
Step 2: Now click on the “Add Server” button. This brings up the Connection Manager – select the server that you want to Monitor.
Step 3: The server is added to the screen and you can see it update its values in real time. The default refresh interval is 1 second. You can easily change this.
That is it. You are done. Just keep this window open, and you can continuously monitor your MongoDB performance. To monitor more servers, go to step 2 and add more servers.
Important points to Note:
- MongoVUE does not store any real-time data on disk
- MongoVUE polls your server for only MongoDB stats, so you won’t get other (typical) monitors like Disk Space, CPU etc
- MongoVUE uses db.serverStatus() command to get the data. This command requires admin privileges and may not work on some hosted MongoDB services like MongoHQ