diff options
Diffstat (limited to 'web/attachments/209994-check_ping.response_handling.patch')
-rw-r--r-- | web/attachments/209994-check_ping.response_handling.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/web/attachments/209994-check_ping.response_handling.patch b/web/attachments/209994-check_ping.response_handling.patch new file mode 100644 index 0000000..f86141c --- /dev/null +++ b/web/attachments/209994-check_ping.response_handling.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Index: plugins/check_ping.c | ||
2 | =================================================================== | ||
3 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v | ||
4 | retrieving revision 1.55 | ||
5 | diff -u -r1.55 check_ping.c | ||
6 | --- plugins/check_ping.c 6 Jan 2007 04:52:58 -0000 1.55 | ||
7 | +++ plugins/check_ping.c 6 Jan 2007 06:08:11 -0000 | ||
8 | @@ -503,10 +503,22 @@ | ||
9 | int | ||
10 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) | ||
11 | { | ||
12 | - if (strstr (buf, "Network is unreachable")) | ||
13 | - die (STATE_CRITICAL, _("CRITICAL - Network unreachable (%s)"), addr); | ||
14 | + if (strstr (buf, "Network is unreachable") || | ||
15 | + strstr (buf, "Destination Net Unreachable") | ||
16 | + ) | ||
17 | + die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr); | ||
18 | else if (strstr (buf, "Destination Host Unreachable")) | ||
19 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr); | ||
20 | + else if (strstr (buf, "Destination Port Unreachable")) | ||
21 | + die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)"), addr); | ||
22 | + else if (strstr (buf, "Destination Protocol Unreachable")) | ||
23 | + die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)"), addr); | ||
24 | + else if (strstr (buf, "Destination Net Prohibited")) | ||
25 | + die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)"), addr); | ||
26 | + else if (strstr (buf, "Destination Host Prohibited")) | ||
27 | + die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)"), addr); | ||
28 | + else if (strstr (buf, "Packet filtered")) | ||
29 | + die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)"), addr); | ||
30 | else if (strstr (buf, "unknown host" )) | ||
31 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr); | ||
32 | else if (strstr (buf, "Time to live exceeded")) | ||