check_mongodb.py
Posted: Thu Dec 03, 2015 12:34 pm
Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_mongodb.py", line 1372, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/nagios/libexec/check_mongodb.py", line 196, in main
err, con = mongo_connect(host, port, ssl, user, passwd, replicaset)
File "/usr/local/nagios/libexec/check_mongodb.py", line 294, in mongo_connect
return exit_with_general_critical(e), None
File "/usr/local/nagios/libexec/check_mongodb.py", line 310, in exit_with_general_critical
if e.strip() == "not master":
AttributeError: 'OperationFailure' object has no attribute 'strip'
Trying to monitor a mongo replica set, 2 data nodes 1 arb.
Mongo is running on the server and working fine for our applications, access between them is open. ClusterAdmin is set on the user.
Connection strings that pass -
check_mondb.py -h
check_mongodb.py -H IP -u "" -p ""
I am not sure why these are all failing. Any ideas?
File "/usr/local/nagios/libexec/check_mongodb.py", line 1372, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/nagios/libexec/check_mongodb.py", line 196, in main
err, con = mongo_connect(host, port, ssl, user, passwd, replicaset)
File "/usr/local/nagios/libexec/check_mongodb.py", line 294, in mongo_connect
return exit_with_general_critical(e), None
File "/usr/local/nagios/libexec/check_mongodb.py", line 310, in exit_with_general_critical
if e.strip() == "not master":
AttributeError: 'OperationFailure' object has no attribute 'strip'
Trying to monitor a mongo replica set, 2 data nodes 1 arb.
Mongo is running on the server and working fine for our applications, access between them is open. ClusterAdmin is set on the user.
Connection strings that pass -
check_mondb.py -h
check_mongodb.py -H IP -u "" -p ""
I am not sure why these are all failing. Any ideas?