check_ping strangeness
Luke Fowler
luke at indiana.edu
Fri Apr 2 00:22:25 CEST 2004
Marc,
tried both as the nagios user and as another non-privledged user. both
work fine:
[root at ratt libexec]# su nagios
[nagios at ratt libexec]$ ./check_ping 10.0.1.2 -w 3000.0,80% -c 5000.0,100%
-p 1
PING OK - Packet loss = 0%, RTA = 9.41 ms
[nagios at ratt libexec]$ ls -l /bin/ping
-rwsr-xr-x 1 root root 28628 Jan 24 2003 /bin/ping
--Luke
On Thu, 1 Apr 2004, Marc Powell wrote:
> 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
>
--
Luke A. Fowler
luke at indiana.edu
Office: 812.856.0978
-------------------------------------------------------
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_id=1470&alloc_id=3638&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