Page 1 of 2

Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 10:38 am
by netaura
Hi,
Please we need help in setting up our mongo servers for monitoring in nagios, using the mongo wizard.Whenever we want to setup the monitoring, the wizard prompts us to install pymongo on the xi server, which we have already done on two occasions.
Thank you,
Ola Adeiga.

Re: Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 11:48 am
by bwallace
What version of Xi are you running? I just ran through both of the mongo wizards on a 5.2.7 test machine here and did not encounter the prompts you mention.
Have you referred to either of these docs?

Nagios XI - Monitoring MongoDB
https://support.nagios.com/kb/article.php?id=251

Also, what is the version of the Mongo wizards? In the XI GUI go to:
Admin > System Extensions > Manage Config Wizards

Re: Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 12:37 pm
by netaura
Our nagios is up to date also, it's 5.2.7. The Mongodb wizard server version 1.0.3, and the version for the database is 1.0.1.

Re: Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 12:59 pm
by rkennedy
What issues are you currently seeing? Can you show us screenshots?

Re: Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 1:15 pm
by netaura
Error: It looks like you are missing pymongo on your Nagios XI server.
To use this wizard you must install pymongo on your server. If you are using CentOS or RHEL you can run "yum install pymongo".

The above is the error we are witnessing, and pymongo is already installed on our xi server.

Re: Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 1:42 pm
by rkennedy
I wonder if it's a version thing, both wizards seem to be running fine on my end. What is the output of rpm -qa | grep 'mongo'?

For reference, here's the output on my system -

Code: Select all


[root@localhost ~]# rpm -qa | grep 'mongo'
python-pymongo-2.5.2-4.el7.x86_64


Re: Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 1:43 pm
by ssax
What is the output of these commands?

Code: Select all

ls -l /usr/local/nagios/libexec/check_mongodb.py
/usr/local/nagios/libexec/check_mongodb.py | head --lines=1

Thank you

Re: Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 1:58 pm
by ssax
Actually, edit this file:

Code: Select all

/usr/local/nagios/libexec/check_mongodb.py
Change line 310 from:

Code: Select all

if e.split() == "not master":
To:

Code: Select all

if e == "not master":
Let us know if that works for you.

Re: Mongo Monitoring Wizard.

Posted: Fri May 13, 2016 5:28 pm
by netaura
Hi, I couldn't locate the line 310 of check_mongodb.py to edit... But below is the output of the specified commands;

# rpm -qa | grep 'mongo'
python-pymongo-2.5.2-4.el7.x86_64

ls -l check_mongodb.py
-rwxr-xr-x 1 nagios nagios 62494 May 6 11:52 check_mongodb.py

Re: Mongo Monitoring Wizard.

Posted: Mon May 16, 2016 9:03 am
by tgriep
Can you run the following commands and post the output?

Code: Select all

su nagios
/usr/local/nagios/libexec/check_mongodb.py --help
find / -name pymongo
ls -l /usr/lib64/python2.7/site-packages/