check_icmp v0.8

Andreas Ericsson ae at op5.se
Thu Dec 30 00:51:12 CET 2004


Jamie Baddeley wrote:
> I've noticed that when check_icmp checks a host that results in ICMP
> unreachables, the ICMP unreachable messages spill over* into other check
> results (specifically status information) for other hosts...Which I am
> fairly sure is not desirable.. I also notice from CLI that for the host
> in question, for 5 pings, 5 ICMP unreachable messages are produced (over
> and above the check result)
> 

Do you mean the status string is shown for other hosts in the nagios 
GUI, or that the status output from the check_icmp plugin is the same 
whether you check one or multiple hosts?

> * "spill over" - I see the icmp unreachable result e.g "ICMP Unreachable
> from 161.65.1.x for ICMP Echo sent to 10.16.0.x"  for a icmp check to
> 10.16.0.x - Right now I have a host down (at 161.65.7.x)  that is
> reached via 161.65.1.x. This is fine. But the odd thing is I have a
> completely different check testing 10.16.0.x  that has nothing in common
> with the 161.65.1.x route, and as you can  see, nagios or check_icmp
> seems to mix things up. 
>  
> The actual result isn't messed with (10.16.0.x is reported as OK) - just
> the status information...
> 
> testing with redirects seems to suggest the output is standard out, not
> standard error.
> 

This is by design. Nagios can't read stderr, so everything intended to 
show up in the cgi's must be written to stdout.

> Shouldn't check_icmp only result in one line of extra status info (i.e
> icmp unreachable etc) *following* the actual result (i.e CRITICAL -
> 161.65.7.x is down)?
> 
> Am I smoking crack or is this a bug?
> 

It was originally a debug line which proved nifty to provide info when 
improper routing was the cause of ICMP_UNREACH'es, so by general demand 
I left it in there. An ICMP_UNREACH message indicates that one (or more) 
routers along the way doesn't know what the next hop of the packet will 
be, so all of the packets will fail (unless the router starts behaving 
magically between two packets).

Anyways. I'm about to undertake a rather massive rewrite of the 
check_icmp plugin. It should fix most if not all of the issues users 
have been having with it.

> 
> noc:~# /usr/lib/nagios/plugins/check_icmp -H 161.65.7.x -w 10,10 -c
> 20,20 -n 1 -r 1 2>/dev/null
> 
> ICMP Unreachable from 161.65.1.xxx for ICMP Echo sent to 161.65.7.x
> ICMP Unreachable from 161.65.1.xxx for ICMP Echo sent to 161.65.7.x
> CRITICAL - 161.65.7.x is down (lost 100%)|rta=;10;20;; pl=100%;10;20;;

That's a bit funny. It seems either the offending (offended?) router 
sends duplicate ICMP's back, or check_icmp sends two packets when told 
to send only 1.

Anyways. I'll add it to the testsuite to make sure it happens the right way.

> noc:~#
> 
> cheers
> 
> jamie
> 
> 
> On Tue, 2004-09-07 at 02:33 +0200, Andreas Ericsson wrote:
> 
>>Background;
>>check_icmp is a plugin designed to measure ICMP response times and 
>>packet-loss. Since it doesn't fork any other programs to do its dirty 
>>work it eliminates the tedious "Unable to parse output" messages" some 
>>users have experienced.
>>
>>Fixes;
>>Some issues were detected with check_icmp version 0.6, which has been 
>>floating around for a while. Now I had the time to fix them, so I did.
>>Those of you looking for version 0.7 will be a bit disappointed. It was 
>>never released to the public.
>>
>>Version 0.8 fixes the following issues;
>>* argument parsing on *BSD systems (can someone confirm?).
>>* performance-data works properly.
>>
>>Notes;
>>* When a 100% packet-loss is encountered, output will be as such:
>>|rta=;warn;crit;; pl=100%;warn;crit;;
>>* Performance data output is only available when checking a single host.
>>
>>Sourcecode is available at
>>http://sourceforge.net/tracker/index.php?func=detail&aid=1008452&group_id=29880&atid=541465
>>and
>>http://devel.op5.se/oss/check_icmp-0.8.tar.gz
>>

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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