[Nagiosplug-devel] [ nagiosplug-Bugs-870548 ] Plugin 1.4.0a1 -> /bin/ping does not terminate

SourceForge.net noreply at sourceforge.net
Sat Jan 1 08:34:11 UTC 2005


Bugs item #870548, was opened at 2004-01-04 21:55
Message generated for change (Settings changed) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=870548&group_id=29880

Category: Argument proccessing
Group: None
Status: Open
Resolution: Fixed
Priority: 5
Submitted By: Christian Exner (banane2000)
>Assigned to: Nobody/Anonymous (nobody)
Summary: Plugin 1.4.0a1 -> /bin/ping does not terminate

Initial Comment:
On our system (Suse 8.1, Nagios 2.0a1, Plugins 1.4.0a1) 
i've detected about 400+ /bin/ping processes going all to 
only 2 IP-addresses (yes... only if the failure takes a 
long time but our failures often takes the whole weekend 
if the german Telekom cuts the DSL-Line of one of our 
external offices...).

It seems that check_ping calls "/bin/ping -n -U -c 5 
x.x.x.x" for checking. If pinged host is not 
reacheable /bin/ping does not terminate for a very long 
time (maybe until the failed host answers again). 
check_ping terminates after 10 secs. This is also 
documented in nagios web interface. But 
corresponding /bin/ping process stays active.

Maybe it would help to pass "-w" (deadline) parameter 
to /bin/ping to force a termination after some time in 
such a case.


Chris


----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2004-02-25 17:03

Message:
Logged In: YES 
user_id=664364

You can do this. I'm only acting as inspiration this time!

----------------------------------------------------------------------

Comment By: Karl DeBisschop (kdebisschop)
Date: 2004-02-25 16:50

Message:
Logged In: YES 
user_id=1671

A worthwhile thought - we pass on a timeout like this with
snmp IIRC.

I think where the native utility has a way to terminate
itself, it is preferable to use it. But modifying spopen to
handle cases where is does not sounds like a good idea.
Shouldn't be too hard since spopen does know the PID. and is
the parent process. But there should be a way to let clean
shutdowns occur - after closing the pipe on a timeout, maybe
exit immediately if the child closes, but only force it
closed after a second or two.

Ton, do you want to do this or should I?

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2004-02-25 16:20

Message:
Logged In: YES 
user_id=664364

Would it make more sense for the check_ping plugin to try 
and kill any child processes when it exits/times out? 

Potentially any command might take too long to respond and 
a kill_children function would be useful across all plugins.

Ton

----------------------------------------------------------------------

Comment By: Florian Gleixner (redflo)
Date: 2004-02-25 08:03

Message:
Logged In: YES 
user_id=183182

On solaris try:

ping hostname timeout

Example:
ping www.google.de 10

or if you want more accurate statistics:

ping -s -t ttl hostname packet_length number_of_packets
Example:
ping -s -t 2 www.google.de 64 5

Flo


----------------------------------------------------------------------

Comment By: Karl DeBisschop (kdebisschop)
Date: 2004-02-25 07:16

Message:
Logged In: YES 
user_id=1671

It would be nicer if the '-w' option were more widely
supported than linux. I can demonstrate that it is not
available on solaris 8, so it's clear that implementing this
change requires modifications to the autoconf script.

But it's probably worth doing, even though there is a risk
that some other implementation will assign a different
meaning to '-w'

----------------------------------------------------------------------

Comment By: Matthew Kent (mattkent)
Date: 2004-02-25 00:25

Message:
Logged In: YES 
user_id=983566

Nagios 1.2, Plugin 1.4.0a1, RedHat 7.3 same problem.

Compiling plugins with --with-ping-command="/bin/ping -w 10
-n -U -c %d %s" solved this.

But it would be nice to have the 10 second timeout for
check_ping kill the ping process.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=870548&group_id=29880




More information about the Nagiosplugin-devel mailing list