Page 1 of 1

NPRE not starting

Posted: Fri Jun 05, 2015 8:32 am
by gabrotherton
Hello,

How is the best way to determine if the NRPE agent is running on a remote server?

I have installed the latest NRPE on a remote RHEL server using the instructions in https://assets.nagios.com/downloads/nag ... g_NRPE.pdf

However, i cannot tell if the NRPE agent is running as a stand alone daemon on the remote server:

[root@rr1 libexec]# service xinetd status
xinetd (pid 15084) is running...
[root@rr1 libexec]# pwd
/usr/local/nagios/libexec
[root@rr1 libexec]# ../bin/nrpe -i
[root@rr1 libexec]# ps -ef|grep nrpe
root 1241 29947 0 09:25 pts/0 00:00:00 grep nrpe


On my Nagios server I am receiving the following errors:

The check_load plugin is configured like this:
check_nrpe!check_load! -a -r -w 15,10,5 -c 30,20,10

The output is:
(No output returned from plugin)

I'm not sure what to check at this point.

Re: NPRE not starting

Posted: Fri Jun 05, 2015 9:15 am
by jdalrymple
On the remote server:

Code: Select all

[jdalrymple@remotehost ~]$ sudo lsof -i | grep -i '\(5666\|nrpe\)'
nrpe      63841     nagios    3u  IPv4 1733198      0t0  TCP *:nrpe (LISTEN)
nrpe      63841     nagios    5u  IPv6 1733199      0t0  TCP *:nrpe (LISTEN)
If that succeeds:

Code: Select all

[jdalrymple@nagios ~]$ nmap -p 5666 <remotehostip>

Starting Nmap 5.51 ( http://nmap.org ) at 2015-06-05 09:14 CDT
Nmap scan report for <remotehostip>
Host is up (0.000049s latency).
PORT     STATE SERVICE
5666/tcp open  nrpe

Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds
lsof needs to be run by root

Re: NPRE not starting

Posted: Fri Jun 05, 2015 9:17 am
by tmcdonald
Check out our NRPE Troubleshooting doc:

https://assets.nagios.com/downloads/nag ... utions.pdf

Specifically section 10.

Re: NPRE not starting

Posted: Fri Jun 05, 2015 12:12 pm
by gabrotherton
Hi Gurus,

I found the issue, it was with my nrpe.cfg on the local system:

I had to uncomment the last lines, but also needed to modify the parameters of the commands from their defaults:

command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

the parameters for the check_load were incorrect and I needed to remove the -w and -c options to become:

command[check_load]=/usr/local/nagios/libexec/check_load $ARG1$ $ARG2$

This matches the Check Load service's Command View for this specific machine in Config -> Core Configuration Manager -> Services.

$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$

$ARG1$ : check_load
$ARG2$ : -a '-w 15,10,5 -c 30,20,10'

Now I am getting expected results and this thread can be closed! 8-)
I hope I included enough information so other admins can benefit.

Could someone please post where the NRPE 2.15 plugins instruction files are located? I stumbled across them yesterday, but forgot to book mark the page.

Re: NPRE not starting

Posted: Fri Jun 05, 2015 12:22 pm
by lmiltchev
Were you looking for this document?

BTW, the easiest route to go is to follow this document:

https://assets.nagios.com/downloads/nag ... _Agent.pdf

The "fullinstall" script takes care of installing NRPE and nagios plugins with one go. You took a different path, but that's OK. If you have any more questions or issues, please start a new thread. I will be locking this topic.