]> git.pld-linux.org Git - packages/monitoring-plugins.git/blob - nagios-plugins-ping.patch
83f5f8cbb0a3948db08b4fd9c4fd865bc34099a8
[packages/monitoring-plugins.git] / nagios-plugins-ping.patch
1 https://github.com/monitoring-plugins/monitoring-plugins/pull/1412
2
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 @@
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                 )
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);
22 @@ -528,11 +529,11 @@
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);
This page took 0.030866 seconds and 2 git commands to generate.