Page 2 of 2

Re: Need help with NRPE in nagiosXI:

Posted: Wed Apr 15, 2015 10:47 am
by lmiltchev
Run the following two commands on the client (remote box) and show us the output:

Code: Select all

ps axuw | grep nrpe
netstat -at | grep nrpe
How did you install NRPE (from repo, using our installer, etc.)?

Also, test your check from the command line (not in the CCM) from the Nagios XI server.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <client ip> -t 60 -c check_mountpoints
If it fails, run the commands below and show us the output:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <client ip>
nmap <client ip> -p 5666

Re: Need help with NRPE in nagiosXI:

Posted: Mon Apr 20, 2015 3:29 am
by shan_1986
Hello,

Below is the output from the remote box:

****@****:~$ ps axuw|grep nrpe
1411391397 20499 0.0 0.0 6504 624 pts/7 S+ 03:10 0:00 grep --color=auto nrpe
nagios 30035 0.0 0.0 39408 804 ? Ss Apr15 1:07 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
****@****:~$ netstat -at | grep nrpe
tcp 0 0 *:nrpe *:* LISTEN


Here is the output from Nagios box:
NRPE is installed via repo.

[****@**** ~]$ /usr/local/nagios/libexec/check_nrpe -H **** -t 60 -c check_mountpoints
NRPE: Unable to read output

[****@**** ~]$ /usr/local/nagios/libexec/check_nrpe -H ****
NRPE v2.12
[****@**** ~]$ nmap **** -p 5666

Starting Nmap 5.51 ( http://nmap.org ) at 2015-04-20 03:13 CDT
Nmap scan report for 192.168.18.102
Host is up (0.011s latency).
PORT STATE SERVICE
5666/tcp open nrpe

Nmap done: 1 IP address (1 host up) scanned in 1.97 second

Re: Need help with NRPE in nagiosXI:

Posted: Mon Apr 20, 2015 11:05 am
by tgriep
It could be a permission problem for the check_mountpoints plugin. Try running the following to change the permission and owner of the file to see if that resolves it for you.

Code: Select all

chown nagios.nagios /usr/lib/nagios/plugins/check_mountpoints
chmod a+rx /usr/lib/nagios/plugins/check_mountpoints

Re: Need help with NRPE in nagiosXI:

Posted: Tue Apr 21, 2015 5:51 am
by shan_1986
I have tried modifying the permission but i'm getting the same error message while executing in CCM and from nagios server.
Is this a problem with ubuntu machine, the same plugin works well in Centos.

Please advise.

Re: Need help with NRPE in nagiosXI:

Posted: Tue Apr 21, 2015 1:13 pm
by lmiltchev
Run the following command on the remote Ubuntu box and show us the output:

Code: Select all

su nagios -c '/usr/lib/nagios/plugins/check_mountpoints -A'
I believe you need to have the "utils.sh" file present in the "/usr/lib/nagios/plugins/" directory. Can you verify that you have it on the Ubuntu box. You may have it on the CentOS machine but not on the Ubuntu one...

Code: Select all

ls -la /usr/lib/nagios/plugins/ | grep utils