1 min read

How to monitor MonogoDB with Nagios

    I  need some Monitoring for Nagios3 of my MongoDB. I found quick some refer in the  MongoDB wiki to this github link. All what you have to do is downloading the Code from github. You need to install pymongo and  python-dev, then you can using it. Here my steps:
wget -c  https://github.com/mzupan/nagios-plugin-mongodb/zipball/master
unzip master -d nagios_plugin_mongodb
rm master
apt-get install python-dev
pip install pymongo
cd nagios_plugin_mongodb/mzupan-nagios-plugin-mongodb-59a9247
cp check_mongodb.py /usr/lib/nagios/plugins/check_mongodb
/usr/lib/nagios/plugins/check_mongodb -h localhost -d monogodb_test_db
/usr/local/lib/python2.6/dist-packages/pymongo/connection.py:378: DeprecationWarning: slave_okay is deprecated. Please use read_preference instead.
 "use read_preference instead.", DeprecationWarning)
OK - Connection took 0 seconds
You can ignore the DeprecationWarning from Python.