If you try now to install Munin monitoring for MongoDB database, you’ll find in the Mongo’s documentation, a link to an repository for munin plugins. The bad thing is this repository were updated for the last time on Feburay 2012. Of course, since 2012, MongoDB evolved and this plugins were not working at all on a recent version of MongoDB (2.6+).
Principally because MongoDB now removed the auto activation of the rest server (for security reasons).
Thanks to Adam Comerford on StackOverflow(link), you now have a recent and working version of these plugins, using python’s pymongo instead of Mongo’s Rest.
For my uses, I forked the fork to add another graph monitoring the number of documents in the database, and a basic setup for Ubuntu.
https://github.com/Cog-g/mongo-munin/tree/feature/add_documents_graphhttps://github.com/Cog-g/mongo-munin/tree/hotfix/fix_mongo_docs_plugin_return_the_count_of_docs
Update (2014/09/25): The document plugin was not returning the correct number of document, but the number of events. It’s now fixed
Update (2014/09/20): Adam Comerford merged my branch into his: https://github.com/comerford/mongo-munin/commit/8980f32762991d5e4931b4d9abb1d3d95863dc12
Adam’s fork: https://github.com/comerford/mongo-munin
Installation for Munin (ubuntu)
Install pymongo:
sudo apt-get install pip sudo apt-get install build-essential python-dev sudo pip install pymongo
Install plugins:
git clone https://github.com/comerford/mongo-munin.git /tmp/mongo-munin sudo cp /tmp/mongo-munin/mongo_* /usr/share/munin/plugins sudo ln -sf /usr/share/munin/plugins/mongo_btree /etc/munin/plugins/mongo_btree sudo ln -sf /usr/share/munin/plugins/mongo_conn /etc/munin/plugins/mongo_conn sudo ln -sf /usr/share/munin/plugins/mongo_lock /etc/munin/plugins/mongo_lock sudo ln -sf /usr/share/munin/plugins/mongo_mem /etc/munin/plugins/mongo_mem sudo ln -sf /usr/share/munin/plugins/mongo_ops /etc/munin/plugins/mongo_ops sudo ln -sf /usr/share/munin/plugins/mongo_docs /etc/munin/plugins/mongo_docs sudo chmod +x /usr/share/munin/plugins/mongo_* sudo service munin-node restart