summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c653cd7)
raw | patch | inline | side by side (parent: c653cd7)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Sat, 6 Jan 2007 06:41:47 +0000 (06:41 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Sat, 6 Jan 2007 06:41:47 +0000 (06:41 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1563 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_ping.c | patch | blob | history |
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index eb3a6dbf9642fae6edf47f3fb53c3b13566c1afd..ca40920cd8d1b198bd9edb48ffddfcac8a08ceb2 100644 (file)
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
int
error_scan (char buf[MAX_INPUT_BUFFER], const char *addr)
{
- if (strstr (buf, "Network is unreachable"))
- die (STATE_CRITICAL, _("CRITICAL - Network unreachable (%s)"), addr);
+ if (strstr (buf, "Network is unreachable") ||
+ strstr (buf, "Destination Net Unreachable")
+ )
+ die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr);
else if (strstr (buf, "Destination Host Unreachable"))
die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr);
+ else if (strstr (buf, "Destination Port Unreachable"))
+ die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)"), addr);
+ else if (strstr (buf, "Destination Protocol Unreachable"))
+ die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)"), addr);
+ else if (strstr (buf, "Destination Net Prohibited"))
+ die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)"), addr);
+ else if (strstr (buf, "Destination Host Prohibited"))
+ die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)"), addr);
+ else if (strstr (buf, "Packet filtered"))
+ die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)"), addr);
else if (strstr (buf, "unknown host" ))
die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr);
else if (strstr (buf, "Time to live exceeded"))