Mongo 3.0.x Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
simon.zetter-lee
Posts: 3
Joined: Wed Dec 09, 2015 11:22 am

Mongo 3.0.x Monitoring

Post by simon.zetter-lee »

Hi,

We have Nagios 5.2.2 and are attempting to monitor our MongoDBs, running on 2 DB servers and 1 Arbiter. Mongo is running on 3.0.4. When attempting to connect to check any of the DB statistics, etc., we are receiving errors as follows:

(No output on stdout) stderr: 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'

The user account that I am account with is in the clusterAdmin Monogo role, so should have the rights to connect.

The same issues also arises when running from command line on the Nagios server. Using the same account that has been specified in the connection strings, I have been able to connect using Monog management tools (eg Mongo Chef).

Thanks,
Simon
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Mongo 3.0.x Monitoring

Post by hsmith »

Can you test this via the command line and post the output here for us to check?
Former Nagios Employee.
me.
Locked