[Nagiosplug-devel] [ nagiosplug-Bugs-1629008 ] check_ping fails to handle Packet filtered error

SourceForge.net noreply at sourceforge.net
Sat Jan 6 07:42:02 CET 2007


Bugs item #1629008, was opened at 2007-01-05 14:20
Message generated for change (Comment added) made by dermoth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1629008&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing problem
Group: Release (specify)
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Chris Allen (cdallen)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ping fails to handle Packet filtered error

Initial Comment:
The current (CVS/1.4.5 both) version of check_ping fails to handle this output from ping (ping utility, iputils-ss020927)

[chrisa at silver plugins]$ ping -c 5 -n 10.179.15.254
PING 10.179.15.254 (10.179.15.254) 56(84) bytes of data.
>From 194.81.46.13 icmp_seq=3 Packet filtered
>From 194.81.46.13 icmp_seq=4 Packet filtered

--- 10.179.15.254 ping statistics ---
5 packets transmitted, 0 received, +2 errors, 100% packet loss, time 4001ms
, pipe 2

and produces:

[chrisa at silver plugins]$ ./check_ping -H 10.179.15.254  80 100 300.0 500.0
/bin/ping -n -U -w 10 -c 5 10.179.15.254
CRITICAL - Could not interpret output from ping command
[chrisa at silver plugins]$ echo $?
3

I've attached a (bad) patch against CVS/1.4.5 which I believe fixes the issue in a safe and functional, but hideous manner.  I look forward to this Just Working in future versions of Nagios.

Thanks,
Chris Allen
Lancaster University Network Services Ltd

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

>Comment By: Thomas Guyot (dermoth)
Date: 2007-01-06 01:42

Message:
Logged In: YES 
user_id=375623
Originator: NO

I researched a bit more and here's all I could get on my Ubuntu box
(Custom filtering done with netfilter on OpenWRT).

>From 192.168.1.2 icmp_seq=1 Destination Net Unreachable
>From 192.168.1.3 icmp_seq=1 Destination Host Unreachable
>From 192.168.1.4 icmp_seq=1 Destination Port Unreachable
>From 192.168.1.5 icmp_seq=1 Destination Protocol Unreachable
>From 192.168.1.6 icmp_seq=1 Destination Net Prohibited
>From 192.168.1.7 icmp_seq=1 Destination Host Prohibited
>From 192.168.1.8 icmp_seq=1 Packet filtered

They all fail except Host Unreachable.

I patched it and here's what I get now:
$ for i in 2 3 4 5 6 7 8; do plugins/check_ping -H 192.168.1.$i -w
0.01,10% -c 0.1,20% -p1 -t1;echo; done
CRITICAL - Network Unreachable (192.168.1.2)
CRITICAL - Host Unreachable (192.168.1.3)
CRITICAL - Bogus ICMP: Port Unreachable (192.168.1.4)
CRITICAL - Bogus ICMP: Protocol Unreachable (192.168.1.5)
CRITICAL - Network Prohibited (192.168.1.6)
CRITICAL - Host Prohibited (192.168.1.7)
CRITICAL - Packet Filtered (192.168.1.8)

It's now fixed in CVS.
File Added: check_ping.response_handling.patch

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

Comment By: Thomas Guyot (dermoth)
Date: 2007-01-06 00:29

Message:
Logged In: YES 
user_id=375623
Originator: NO

While trying to reproduce I got one more:

>From 192.168.1.2 icmp_seq=1 Destination Port Unreachable

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

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




More information about the Devel mailing list