Getting started with Munin

This is not a tutorial on how to install Munin itself. I assume that from this point, you have Munin and Munin-node running on your system and that you see basic Munin stats charts.

MongoDB configuration

MongoDB provides a simple http interface listing information of interest to administrators. This interface may be accessed at the port with a numeric value 1000 more than the configured mongod port. The default port for the http interface is 28017 (description copy-pasted from here). By default it is not enabled but it is required by Munin MongoDB plugins, so we need to turn it on.

Warning! Keep in mind, that if you don’t block it, it will listed on your public interface and it will be accessible by default from internet. Please use iptables to make it work only from localhost.

To enable it, edit your /etc/mongod.conf file, find httpinterface line and uncomment it (or set to true if set to false):

After restarting munin-node and waiting few minutes, we should have a new section in your munin web ui (mongodb). Part of the graphs won’t display any data, but you should at least see the mongodb section.

Debugging and fixing Munin MongoDB broken plugins

Some of the plugins (like mongo_lock) won’t work without a little tuneup. If you see graphs similar to this (without any data and -nan everywhere), then most likely those plugins aren’t working.

To check each of the plugins, you need to run munin-run with appropriate plugin name (as root):