Originally Posted by MensaWater
It seems to work for me from command line.
What happens on the nrpe client if you run the following from command line (that is bypass the Nagios master for a second)?
/usr/lib64/nagios/plugins/check_procs -w 300 -c 350
When you get the warning on the Nagios master what exactly does it show on the full line?
From the Nagios master if you run from command line:
check_nrpe -H <hostname> -c "check_total_procs"
do you get the same response as when you run it as:
check_nrpe -H <ip address> -c "check_total_procs"
That is run it from command line and specify actual host name in first invocation and host's IP address in second invocation. I've seen many an issue in Nagios caused because hosts.cfg had the wrong IP.
By breaking down your testing to various levels you can determine where it is breaking. The first test eliminates the Nagios master software and NRPE configuration. The latter two tests check functionality of check_nrpe to the nrpe client so eliminate the rest of the Nagios master setup. If it works at one level but not at others you can focus your efforts where it doesn't.
One problem I have is that it's not constant. The alert usually comes through later in the evening and is followed in 5-10 minutes by the recovery alert. By running the check_procs on the local machine, it comes back OK, but the # of processes are below the 150 mark, too, so I find it irrelevant.
root@fileserver:~# /usr/lib64/nagios/plugins/check_procs -w 300 -c 350
PROCS OK: 141 processes
If, from the master, I run the command
check_nrpe -H fileserver -c "check_total_procs"
check_nrpe -H "File Server" -c "check_total_procs"
As the host is configured as File Server with an alias of fileserver. The first one brings back invalid host, the second one returns:
root@monitor:~# /usr/lib/nagios/plugins/check_nrpe -H 192.168.168.3 -c "check_total_procs"
PROCS OK: 136 processes
Unless you know of some way to temporarily create artificial processes, which I'd be open to try, I have a ~5 minute windows of opportunity to figure it out.