]>
Commit | Line | Data |
---|---|---|
445a0b61 ER |
1 | https://github.com/monitoring-plugins/monitoring-plugins/pull/1412 |
2 | ||
0cf0f353 ER |
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 | |
5 | @@ -515,12 +515,13 @@ | |
705e1800 AM |
6 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) |
7 | { | |
8 | if (strstr (buf, "Network is unreachable") || | |
9 | - strstr (buf, "Destination Net Unreachable") | |
10 | + strstr (buf, "Destination Net Unreachable") || | |
11 | + strstr (buf, "No route") | |
12 | ) | |
0cf0f353 | 13 | die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr); |
705e1800 AM |
14 | - else if (strstr (buf, "Destination Host Unreachable")) |
15 | + else if (strstr (buf, "Destination Host Unreachable") || strstr(buf, "Address unreachable")) | |
0cf0f353 | 16 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr); |
705e1800 AM |
17 | - else if (strstr (buf, "Destination Port Unreachable")) |
18 | + else if (strstr (buf, "Destination Port Unreachable") || strstr(buf, "Port unreachable")) | |
0cf0f353 | 19 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr); |
705e1800 | 20 | else if (strstr (buf, "Destination Protocol Unreachable")) |
0cf0f353 ER |
21 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr); |
22 | @@ -528,11 +529,11 @@ | |
23 | die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr); | |
705e1800 | 24 | else if (strstr (buf, "Destination Host Prohibited")) |
0cf0f353 | 25 | die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr); |
705e1800 AM |
26 | - else if (strstr (buf, "Packet filtered")) |
27 | + else if (strstr (buf, "Packet filtered") || strstr(buf, "Administratively prohibited")) | |
0cf0f353 | 28 | die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr); |
705e1800 | 29 | else if (strstr (buf, "unknown host" )) |
0cf0f353 | 30 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr); |
705e1800 AM |
31 | - else if (strstr (buf, "Time to live exceeded")) |
32 | + else if (strstr (buf, "Time to live exceeded") || strstr(buf, "Time exceeded")) | |
0cf0f353 ER |
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); |