diff options
-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 ba7af373..5ea11294 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c | |||
@@ -527,12 +527,13 @@ int | |||
527 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) | 527 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) |
528 | { | 528 | { |
529 | if (strstr (buf, "Network is unreachable") || | 529 | if (strstr (buf, "Network is unreachable") || |
530 | strstr (buf, "Destination Net Unreachable") | 530 | strstr (buf, "Destination Net Unreachable") || |
531 | strstr (buf, "No route") | ||
531 | ) | 532 | ) |
532 | die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr); | 533 | die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr); |
533 | else if (strstr (buf, "Destination Host Unreachable")) | 534 | else if (strstr (buf, "Destination Host Unreachable") || strstr(buf, "Address unreachable")) |
534 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr); | 535 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr); |
535 | else if (strstr (buf, "Destination Port Unreachable")) | 536 | else if (strstr (buf, "Destination Port Unreachable") || strstr(buf, "Port unreachable")) |
536 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr); | 537 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr); |
537 | else if (strstr (buf, "Destination Protocol Unreachable")) | 538 | else if (strstr (buf, "Destination Protocol Unreachable")) |
538 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr); | 539 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr); |
@@ -540,11 +541,11 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) | |||
540 | die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr); | 541 | die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr); |
541 | else if (strstr (buf, "Destination Host Prohibited")) | 542 | else if (strstr (buf, "Destination Host Prohibited")) |
542 | die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr); | 543 | die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr); |
543 | else if (strstr (buf, "Packet filtered")) | 544 | else if (strstr (buf, "Packet filtered") || strstr(buf, "Administratively prohibited")) |
544 | die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr); | 545 | die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr); |
545 | else if (strstr (buf, "unknown host" )) | 546 | else if (strstr (buf, "unknown host" )) |
546 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr); | 547 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr); |
547 | else if (strstr (buf, "Time to live exceeded")) | 548 | else if (strstr (buf, "Time to live exceeded") || strstr(buf, "Time exceeded")) |
548 | die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr); | 549 | die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr); |
549 | else if (strstr (buf, "Destination unreachable: ")) | 550 | else if (strstr (buf, "Destination unreachable: ")) |
550 | die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr); | 551 | die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr); |