diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2022-01-14 16:28:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-14 16:28:24 +0100 |
commit | 85c8dcddfaa5db90c9889a9dc170ab1b3d4de6a1 (patch) | |
tree | d0c57e2ee3a77cf4e2173aa2b34c5948ce018471 /plugins | |
parent | 54a3a5ea623e5cfd65d810f4b6792f199470b2d4 (diff) | |
parent | 05ac8a98a85e748643e6f2ab268587e6f78244f6 (diff) | |
download | monitoring-plugins-85c8dcddfaa5db90c9889a9dc170ab1b3d4de6a1.tar.gz |
Merge pull request #1412 from glensc/pld/nagios-plugins-ping.patch
[check_ping] understang ping6 output from iputils package
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_ping.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c index ba7af373..5ea11294 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c @@ -527,12 +527,13 @@ int error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) { if (strstr (buf, "Network is unreachable") || - strstr (buf, "Destination Net Unreachable") + strstr (buf, "Destination Net Unreachable") || + strstr (buf, "No route") ) die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr); - else if (strstr (buf, "Destination Host Unreachable")) + else if (strstr (buf, "Destination Host Unreachable") || strstr(buf, "Address unreachable")) die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr); - else if (strstr (buf, "Destination Port Unreachable")) + else if (strstr (buf, "Destination Port Unreachable") || strstr(buf, "Port unreachable")) die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr); else if (strstr (buf, "Destination Protocol Unreachable")) die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr); @@ -540,11 +541,11 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr); else if (strstr (buf, "Destination Host Prohibited")) die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr); - else if (strstr (buf, "Packet filtered")) + else if (strstr (buf, "Packet filtered") || strstr(buf, "Administratively prohibited")) die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr); else if (strstr (buf, "unknown host" )) die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr); - else if (strstr (buf, "Time to live exceeded")) + else if (strstr (buf, "Time to live exceeded") || strstr(buf, "Time exceeded")) die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr); else if (strstr (buf, "Destination unreachable: ")) die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr); |