Package: nagios-plugins-basic Version: 1.4.15-3squeeze1.1-ip6fix Severity: important
check_ping gives back unknown instead of critical when host ist unreachable via ipv6. This is because ping6 returns an other output then expected by the check. Patch is attached. -- System Information: Debian Release: wheezy/sid APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-2-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages nagios-plugins-basic depends on: ii iputils-ping 3:20101006-1+b1 Tools to test the reachability of ii libc6 2.11.2-11 Embedded GNU C Library: Shared lib ii libssl1.0.0 1.0.0d-2 SSL shared libraries ii procps 1:3.2.8-10 /proc file system utilities ii ucf 3.0025+nmu1 Update Configuration File: preserv nagios-plugins-basic recommends no packages. Versions of packages nagios-plugins-basic suggests: ii nagios3 3.2.3-1 A host/service/network monitoring -- no debconf information
#! /bin/sh /usr/share/dpatch/dpatch-run ## 15_check_pink_ip6.dpatch ## Sandro Filippi <sandro.fili...@iway.ch> ## ## DP: Fix ping6 output parsing @DPATCH@ --- a/plugins/check_ping.c +++ b/plugins/check_ping.c @@ -517,6 +517,10 @@ error_scan (char buf[MAX_INPUT_BUFFER], strstr (buf, "Destination Net Unreachable") ) die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr); + else if (strstr (buf, "Destination unreachable: Address unreachable")) + die (STATE_CRITICAL, _("CRITICAL - Host unreachable (%s)"), addr); + else if (strstr (buf, "Destination unreachable: No route")) + die (STATE_CRITICAL, _("CRITICAL - No route to host (%s)"), addr); else if (strstr (buf, "Destination Host Unreachable")) die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr); else if (strstr (buf, "Destination Port Unreachable"))
signature.asc
Description: OpenPGP digital signature