diff options
Diffstat (limited to 'web/attachments/343293-nagios-plugins-ping.patch')
| -rw-r--r-- | web/attachments/343293-nagios-plugins-ping.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/web/attachments/343293-nagios-plugins-ping.patch b/web/attachments/343293-nagios-plugins-ping.patch new file mode 100644 index 0000000..232d97f --- /dev/null +++ b/web/attachments/343293-nagios-plugins-ping.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | --- nagios-plugins-1.4.13/plugins/check_ping.c.org 2009-09-17 08:56:15.043692330 +0200 | ||
| 2 | +++ nagios-plugins-1.4.13/plugins/check_ping.c 2009-09-17 09:04:41.830352692 +0200 | ||
| 3 | @@ -519,12 +519,13 @@ | ||
| 4 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) | ||
| 5 | { | ||
| 6 | if (strstr (buf, "Network is unreachable") || | ||
| 7 | - strstr (buf, "Destination Net Unreachable") | ||
| 8 | + strstr (buf, "Destination Net Unreachable") || | ||
| 9 | + strstr (buf, "No route") | ||
| 10 | ) | ||
| 11 | die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr); | ||
| 12 | - else if (strstr (buf, "Destination Host Unreachable")) | ||
| 13 | + else if (strstr (buf, "Destination Host Unreachable") || strstr(buf, "Address unreachable")) | ||
| 14 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr); | ||
| 15 | - else if (strstr (buf, "Destination Port Unreachable")) | ||
| 16 | + else if (strstr (buf, "Destination Port Unreachable") || strstr(buf, "Port unreachable")) | ||
| 17 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)"), addr); | ||
| 18 | else if (strstr (buf, "Destination Protocol Unreachable")) | ||
| 19 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)"), addr); | ||
| 20 | @@ -532,11 +533,11 @@ | ||
| 21 | die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)"), addr); | ||
| 22 | else if (strstr (buf, "Destination Host Prohibited")) | ||
| 23 | die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)"), addr); | ||
| 24 | - else if (strstr (buf, "Packet filtered")) | ||
| 25 | + else if (strstr (buf, "Packet filtered") || strstr(buf, "Administratively prohibited")) | ||
| 26 | die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)"), addr); | ||
| 27 | else if (strstr (buf, "unknown host" )) | ||
| 28 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr); | ||
| 29 | - else if (strstr (buf, "Time to live exceeded")) | ||
| 30 | + else if (strstr (buf, "Time to live exceeded") || strstr(buf, "Time exceeded")) | ||
| 31 | die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)"), addr); | ||
| 32 | |||
| 33 | if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) { | ||
