Nagios 监控 MongoDB

插件 github 上有现成的:
$ wget -c  https://github.com/mzupan/nagios-plugin-mongodb/zipball/master
$ unzip master -d nagios_plugin_mongodb
$ rm master
$ sudo apt-get install python-dev python-setuptools -y
$ sudo easy_install pymongo
$ cd nagios_plugin_mongodb/mzupan-nagios-plugin-mongodb-59a9247
$ cp check_mongodb.py $NAGIOSROOTPATH/libexec
$ $NAGIOSROOTPATH/libexec/check_mongodb.py -H 192.168.10.42 -P 27017 -A connect -W 1 -C 3

ref:
http://zcentric.com/2010/06/18/mongodb-nagios-plugin-created/