Module: check_mk
Branch: master
Commit: e9be56096822e27b55ae56f9f8dcfe6dd39b0907
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e9be56096822e2…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue May 29 17:45:24 2012 +0200
solaris_multipath: Added warning level if less then 50% of paths are down
---
checks/solaris_multipath | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/checks/solaris_multipath b/checks/solaris_multipath
index ac1a231..a23f737 100644
--- a/checks/solaris_multipath
+++ b/checks/solaris_multipath
@@ -31,10 +31,13 @@ def check_solaris_multipath(item, params, info):
for line in info:
if line[0].split('/')[-1] == item:
total, ok = map(int, line[1:3])
- if total > ok:
+ if total > ok and (100 / total) * ok <= 50:
return(2, "CRIT - only %d/%d paths up" % (ok, total))
- else:
+ elif total == ok:
return(0, "OK - %d paths up" % total)
+ else:
+ return(1, "WARN - only %d/%d paths up" % (ok, total))
+
return(2, "UKN - Path not found")
check_info["solaris_multipath"] = {