1 https://github.com/monitoring-plugins/monitoring-plugins/pull/1412
3 --- nagios-plugins-1.4.16/plugins/check_ping.c~ 2012-12-06 16:43:57.000000000 +0200
4 +++ nagios-plugins-1.4.16/plugins/check_ping.c 2012-12-06 16:45:32.053840313 +0200
6 error_scan (char buf[MAX_INPUT_BUFFER], const char *addr)
8 if (strstr (buf, "Network is unreachable") ||
9 - strstr (buf, "Destination Net Unreachable")
10 + strstr (buf, "Destination Net Unreachable") ||
11 + strstr (buf, "No route")
13 die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr);
14 - else if (strstr (buf, "Destination Host Unreachable"))
15 + else if (strstr (buf, "Destination Host Unreachable") || strstr(buf, "Address unreachable"))
16 die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr);
17 - else if (strstr (buf, "Destination Port Unreachable"))
18 + else if (strstr (buf, "Destination Port Unreachable") || strstr(buf, "Port unreachable"))
19 die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr);
20 else if (strstr (buf, "Destination Protocol Unreachable"))
21 die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr);
23 die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr);
24 else if (strstr (buf, "Destination Host Prohibited"))
25 die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr);
26 - else if (strstr (buf, "Packet filtered"))
27 + else if (strstr (buf, "Packet filtered") || strstr(buf, "Administratively prohibited"))
28 die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr);
29 else if (strstr (buf, "unknown host" ))
30 die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr);
31 - else if (strstr (buf, "Time to live exceeded"))
32 + else if (strstr (buf, "Time to live exceeded") || strstr(buf, "Time exceeded"))
33 die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr);
34 else if (strstr (buf, "Destination unreachable: "))
35 die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr);