[Pkg-nagios-devel] Minor dependency issue
David Greaves
david@dgreaves.com
Mon, 14 Mar 2005 09:06:52 +0000
sean finney wrote:
>hi david,
>
>On Sun, Mar 13, 2005 at 09:31:57PM +0000, David Greaves wrote:
>
>
>>Should nagios depend on iputils-ping as the netkit-ping package's ping
>>doesn't support -U or -w which nagios config uses by default.
>>
>>
>
>okay, how about changing depends to
>
>Depends: ping | iputils-ping | netkit-ping
>
>?
>
>
Well, my point is that nagios uses the special features only found in
iputils-ping.
particularly -w:
-w deadline
Specify a timeout, in seconds, before ping exits
regardless of how many pack-
ets have been sent or received. In this case ping does
not stop after count
packet are sent, it waits either for deadline expire or
until count probes are
answered or for some error notification from network.
without this, I assume that nagios' probes, as configured would hang if
a host was down...
[sourceforge's cvs browse is down for me so I can't check where/how the
-w gets put in. I can't find the command line options anywhere in the
nagios config (it uses check_ping exclusively!) so I'm guessing that
check_ping uses the local binary and when it failed it returned the ping
command it was using (ping -n -U -w 10 -c 1 10.0.0.5) and this is where
I got the cli args from...]
[later edit: a-ha!!
strings /usr/lib/nagios/plugins/check_ping | grep ping includes
/bin/ping -n -U -w %d -c %d %s
in it's output - I was frantically wondering if I'd been working on
another bit of monitoring sw <grin>]
So, in my case, nagios just reported everything down (ping used invalid
args and returned an error indicating the host was down)
The only alternative I see is to have check_ping implement the -w option
through a timer around the netkit-ping :)
David
PS New to nagios code so I could be embarrassing myself here - OTOH this
could help other newbies :)