diff options
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r-- | plugins/check_ping.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c index eb3a6dbf..ca40920c 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c | |||
@@ -503,10 +503,22 @@ run_ping (const char *cmd, const char *addr) | |||
503 | int | 503 | int |
504 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) | 504 | error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) |
505 | { | 505 | { |
506 | if (strstr (buf, "Network is unreachable")) | 506 | if (strstr (buf, "Network is unreachable") || |
507 | die (STATE_CRITICAL, _("CRITICAL - Network unreachable (%s)"), addr); | 507 | strstr (buf, "Destination Net Unreachable") |
508 | ) | ||
509 | die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr); | ||
508 | else if (strstr (buf, "Destination Host Unreachable")) | 510 | else if (strstr (buf, "Destination Host Unreachable")) |
509 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr); | 511 | die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr); |
512 | else if (strstr (buf, "Destination Port Unreachable")) | ||
513 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)"), addr); | ||
514 | else if (strstr (buf, "Destination Protocol Unreachable")) | ||
515 | die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)"), addr); | ||
516 | else if (strstr (buf, "Destination Net Prohibited")) | ||
517 | die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)"), addr); | ||
518 | else if (strstr (buf, "Destination Host Prohibited")) | ||
519 | die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)"), addr); | ||
520 | else if (strstr (buf, "Packet filtered")) | ||
521 | die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)"), addr); | ||
510 | else if (strstr (buf, "unknown host" )) | 522 | else if (strstr (buf, "unknown host" )) |
511 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr); | 523 | die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr); |
512 | else if (strstr (buf, "Time to live exceeded")) | 524 | else if (strstr (buf, "Time to live exceeded")) |