mzupan / nagios-plugin-mongodb

A Nagios plugin to check the status of MongoDB
BSD 2-Clause "Simplified" License
346 stars 274 forks source link

Plugin Misbehaving with Mongo Version 2.4.3 for Index_miss_ration Call. With CRITICAL - General MongoDB Error: 'note' #81

Open saurajeet opened 11 years ago

saurajeet commented 11 years ago

$ python /usr/lib64/nagios/plugins/custom/check_mongodb.py -H mongo-host -u admin -d mrs -p qwedsa -D -A index_miss_ratio -C .1 CRITICAL - General MongoDB Error: 'note' Using Pymongo 2.1.1

saurajeet commented 11 years ago

Pasting Python Listfunc Dump CRITICAL - General MongoDB Error: 'note'

 functions called:
 filename: /usr/lib/python2.6/site-packages/hashlib-20081119-py2.6-linux-x86_64.egg/hashlib.py, modulename: hashlib, funcname: <lambda>
 filename: /usr/lib/python2.6/site-packages/hashlib-20081119-py2.6-linux-x86_64.egg/hashlib.py, modulename: hashlib, funcname: <module>
 filename: /usr/lib64/nagios/plugins/custom/check_mongodb.py, modulename: check_mongodb, funcname: <module>
 filename: /usr/lib64/nagios/plugins/custom/check_mongodb.py, modulename: check_mongodb, funcname: exit_with_general_critical
 filename: /usr/lib64/nagios/plugins/custom/check_mongodb.py, modulename: check_mongodb, funcname: index_miss_ratio
 filename: /usr/lib64/nagios/plugins/custom/check_mongodb.py, modulename: check_mongodb, funcname: main
 filename: /usr/lib64/nagios/plugins/custom/check_mongodb.py, modulename: check_mongodb, funcname: optional_arg
 filename: /usr/lib64/nagios/plugins/custom/check_mongodb.py, modulename: check_mongodb, funcname: set_read_preference
 ....
mzupan commented 11 years ago

Looks like you don't have that in your mongo stats.. can you send post the output of

db.serverStatus();

In your mongo shell

mzupan commented 11 years ago

I also pushed a change just now to make the try/except fail better if it has note in the indexCounter array which means the check has failed