Module: check_mk
Branch: master
Commit: d1330bcd08cef443f382736ac804c4c9ba70a9cd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d1330bcd08cef4…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 22 17:20:51 2013 +0100
FIX: megaraid_pdisk: deal with special output of Open-E
Conflicts:
ChangeLog
---
ChangeLog | 2 ++
checks/megaraid_pdisks | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ff061e4..22439c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,8 @@
* FIX: mysql: fixed crash on computing IO information
* FIX: diskstat: fix local variable 'ios_per_sec' referenced before
assignment
* FIX: multipath: ignore warning messages in agent due to invalid multipath.conf
+ * FIX: megaraid_bbu: deal with broken output ("Adpater"), found in Open-E
+ * FIX: megaraid_pdisk: deal with special output of Open-E
* FIX: jolokia_metrics.mem: renamed parameter totalheap to total
* FIX: megaraid_bbu: deal with broken output ("Adpater")
* Linux agent: limit netstat to 10 seconds
diff --git a/checks/megaraid_pdisks b/checks/megaraid_pdisks
index 54b9ed8..efb7ef7 100644
--- a/checks/megaraid_pdisks
+++ b/checks/megaraid_pdisks
@@ -57,7 +57,7 @@ def megaraid_pdisks_parse(info):
current_adapter = adapters[0]
return_var = []
adapter = 0
- enclosure_devid = 0
+ enclosure_devid = -181
for line in info:
if line[0] == 'adapter':
current_adapter = {}
@@ -77,6 +77,11 @@ def megaraid_pdisks_parse(info):
except: # no enclosure device
enclosure_devid = 0
adapters[adapter][0] = 0
+ elif line[0] == "Enclosure" and line[1] == "Number:":
+ for devid, number in current_adapter.items():
+ if number == int(line[-1]):
+ enclosure_devid = devid
+ break
elif line[0] == "Slot":
slot = int(line[-1])
@@ -88,6 +93,7 @@ def megaraid_pdisks_parse(info):
return_var.append((megaraid_pdisks_adapterstr[adapter],
adapters[adapter][enclosure_devid],
enclosure_devid, slot, state, name))
+
return return_var