check_ping strangeness

Marc Powell marc at ena.com
Fri Apr 2 00:18:11 CEST 2004


On Thursday, April 01, 2004 3:54 PM, Luke Fowler shared with us:

> We have recently set up a Nagios instance on a redhat 9 box, and are
> seeing strange things from check_ping (which we are using as a host
> check).  
> 
> Our service checks are all working fine, and returning output as
> expected. 
> check_ping, however, is doing some strange things.
> 
> Pings to devices that are pingable return the following in the status
> information field: "/bin/ping -n -U -c 1 10.0.1.1"  (the /bin/ping
> command that check_ping is calling, I assume).  
> 
> However, running check_ping from the command line, with the same
> parameters, gives: 
> 
> [luke at ratt libexec]$ ./check_ping -H 10.0.1.1 -w 3000.0,80% -c
> 5000.0,100% -p 1 PING OK - Packet loss = 0%, RTA = 7.32 ms 
> 
> The definition in checkcommands.cfg:
> 
> define command{
>         command_name    check-host-alive
>         command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w
> 3000.0,80% -c 5000.0,100% -p 1
>         }
> 
> 
> Any idea what could be causing this?

Yes. Did you run your test command as root or the nagios user, which
check_ping is run as? /bin/ping probably isn't executable by any user
other than root. To change that, chmod 4755 /bin/ping and make sure it's
owned by root.

--
Marc


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
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