Module: check_mk
Branch: master
Commit: d35100dd87a4f08504c2dd9681c4a1275761487c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d35100dd87a4f0…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Jan 10 11:02:32 2014 +0100
emcvnx_hwstatus: FIX: in EMC VNX 7500 series there is a new type of enclosures called SPE
which did break the check because of unexpected output
---
checks/emcvnx_hwstatus | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/checks/emcvnx_hwstatus b/checks/emcvnx_hwstatus
index 0364b56..d2fbd9d 100644
--- a/checks/emcvnx_hwstatus
+++ b/checks/emcvnx_hwstatus
@@ -82,6 +82,9 @@
def parse_emcvnx_hwstatus(info):
parsed = {}
for line in info:
+ # recognice Enclosures by a line like
+ # DAE6S Bus 0 Enclosure 1
+ # with maybe an additional error message if Overall Status is not ok
if len(line) > 3 and line[1] == "Bus" and line[3] ==
"Enclosure":
encid = line[2] + "/" + line[4]
enc = {}
@@ -90,6 +93,19 @@ def parse_emcvnx_hwstatus(info):
enc["Overall Status"] = line[5].replace("*",
"")
else:
enc["Overall Status"] = "No Errors Reported"
+ # recognice Enclosures by a line like
+ # SPE5 Enclosure SPE
+ # with maybe an additional error message if Overall Status is not ok
+ elif len(line) > 2 and line[1] == "Enclosure":
+ encid = line[2]
+ enc = {}
+ parsed[encid] = enc
+ if len(line) > 3:
+ enc["Overall Status"] = line[3].replace("*",
"")
+ else:
+ enc["Overall Status"] = "No Errors Reported"
+ # gather additional information about an Enclosure found in one
+ # of the cases above
elif len(line) > 2 and line[-2] == "State:":
if line[0] == "SP":
device = line[0] + " " + line[1]