Check_ping question

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Yao-Dzi
Posts: 2
Joined: Wed Nov 23, 2011 8:02 am

Check_ping question

Post by Yao-Dzi »

Hello,

I have added check_ping command to monitor the hosts but can't get it work, everythig is configured the same ( as other commands) but this plugins doesn't want to work.

On remote host in nrpe.cfg the command is defined as:
command[check_ping]=/usr/local/nagios/libexec/check_ping -H localhost -w 100.0,60% -c 200.0,60%
and from this remote server command line it works:
# /usr/local/nagios/libexec/check_ping -H localhost -w 100.0,60% -c 200.0,60%
PING OK - Packet loss = 0%, RTA = 0.05 ms|rta=0.047000ms;100.000000;200.000000;0.000000 pl=0%;60;60;0
BUT Nagios page gives an orange error:

PING UNKNOWN 11-23-2011 15:15:30 0d 0h 21m 10s 3/3 /bin/ping6 -n -U -w 30 -c 5 localhost

On nagios server in the host configuration I have:
# Ping check

define service{
use generic-service
host_name z1.***.com
service_description PING
check_command check_nrpe!check_ping
max_check_attempts 3
}
OS on the both servers is CentOS Linux release 6.0

Please explain what am I doing wrong and how to fix this?
Yao-Dzi
Posts: 2
Joined: Wed Nov 23, 2011 8:02 am

Re: Check_ping question

Post by Yao-Dzi »

Problem solved, /bin/ping and /bin/ping6 needed chmod u+s :D
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Check_ping question

Post by jsmurphy »

Why are you using NRPE to execute the command? Is there a firewall between the Nagios box and your remote server and the only allowed port is 5666? Running check_ping on the remote host won't tell you if the host goes down for two reasons:
1. NRPE won't be able to reach the remote host in order to execute the command.
2. 127.0.0.1 (localhost) will almost always be alive even when the box is not contactable.

Run check_ping directly from the nagios box and use the -H parameter to specify the remote host.
Locked