check_ping gives host check timed out instead of packet loss.

Marc Powell marc at ena.com
Sun Apr 19 16:05:44 CEST 2009


On Apr 19, 2009, at 2:43 AM, Gaurav Ghimire wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> I don't know if I am missing something here. But shouldn't the  
> check_ping plugin give a 100% packet loss if the host is not  
> reachable instead of returning 'Host check timed out'.

check_ping is just a wrapper for /bin/ping on your system. It's  
typically going to just return whatever output that does. In this  
case, I suspect that /bin/ping is just taking too long to return  
results, i.e. you've specified too many packets for your timeout value  
perhaps or devices between you and the destination host are slow to  
return ICMP results, and check_ping or nagios is timing it out before  
it's done.

You could try lowering the number of packets you send (1 or 2 are  
typically enough for a host check) or, if you're using nagios-3,  
increasing the plugin timeout and nagios' master service check timeout  
(in nagios.cfg) to allow the plugin to wait longer for /bin/ping to  
finish.

You could also try using check_icmp instead of /bin/ping. It doesn't  
rely on /bin/ping and instead has it's own internal ICMP code.

--
Marc

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list