diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/check_ping.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 423ecbe5..36de7cf6 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c | |||
| @@ -521,12 +521,13 @@ int | |||
| 521 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) | 521 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) |
| 522 | { | 522 | { |
| 523 | if (strstr (buf, "Network is unreachable") || | 523 | if (strstr (buf, "Network is unreachable") || |
| 524 | strstr (buf, "Destination Net Unreachable") | 524 | strstr (buf, "Destination Net Unreachable") || |
| 525 | strstr (buf, "No route") | ||
| 525 | ) | 526 | ) |
| 526 | die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr); | 527 | die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr); |
| 527 | else if (strstr (buf, "Destination Host Unreachable")) | 528 | else if (strstr (buf, "Destination Host Unreachable") || strstr(buf, "Address unreachable")) |
| 528 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr); | 529 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr); |
| 529 | else if (strstr (buf, "Destination Port Unreachable")) | 530 | else if (strstr (buf, "Destination Port Unreachable") || strstr(buf, "Port unreachable")) |
| 530 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr); | 531 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr); |
| 531 | else if (strstr (buf, "Destination Protocol Unreachable")) | 532 | else if (strstr (buf, "Destination Protocol Unreachable")) |
| 532 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr); | 533 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr); |
| @@ -534,11 +535,11 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) | |||
| 534 | die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr); | 535 | die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr); |
| 535 | else if (strstr (buf, "Destination Host Prohibited")) | 536 | else if (strstr (buf, "Destination Host Prohibited")) |
| 536 | die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr); | 537 | die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr); |
| 537 | else if (strstr (buf, "Packet filtered")) | 538 | else if (strstr (buf, "Packet filtered") || strstr(buf, "Administratively prohibited")) |
| 538 | die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr); | 539 | die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr); |
| 539 | else if (strstr (buf, "unknown host" )) | 540 | else if (strstr (buf, "unknown host" )) |
| 540 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr); | 541 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr); |
| 541 | else if (strstr (buf, "Time to live exceeded")) | 542 | else if (strstr (buf, "Time to live exceeded") || strstr(buf, "Time exceeded")) |
| 542 | die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr); | 543 | die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr); |
| 543 | else if (strstr (buf, "Destination unreachable: ")) | 544 | else if (strstr (buf, "Destination unreachable: ")) |
| 544 | die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr); | 545 | die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr); |
