1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- nagios-plugins-1.4.13/plugins/check_ping.c.org 2009-09-17 08:56:15.043692330 +0200
+++ nagios-plugins-1.4.13/plugins/check_ping.c 2009-09-17 09:04:41.830352692 +0200
@@ -519,12 +519,13 @@
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)"), 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)"), 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)"), addr);
else if (strstr (buf, "Destination Protocol Unreachable"))
die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)"), addr);
@@ -532,11 +533,11 @@
die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)"), addr);
else if (strstr (buf, "Destination Host Prohibited"))
die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)"), addr);
- else if (strstr (buf, "Packet filtered"))
+ else if (strstr (buf, "Packet filtered") || strstr(buf, "Administratively prohibited"))
die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)"), addr);
else if (strstr (buf, "unknown host" ))
die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), 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)"), addr);
if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) {
|