Module: check_mk
Branch: master
Commit: 736df5840b36de96d78f229d50955fbfefc11c8e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=736df5840b36de…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Feb 23 13:15:00 2012 +0100
FIX: megaraid_bbu: fix problem with alternative agent output
---
ChangeLog | 2 ++
checks/megaraid_bbu | 13 ++++++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 353c5a0..dd84683 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,8 @@
* FIX: check_mk-hp_blade_psu.php: allow more than 4 power supplies
* FIX: smart plugin: handle cases with missing vendor (thanks
to Stefan Kärst)
+ * FIX: megaraid_bbu: fix problem with alternative agent output
+ (thanks to Daniel Tuecks)
Multisite:
* Added several missing localization strings
diff --git a/checks/megaraid_bbu b/checks/megaraid_bbu
index 183352b..1e0066b 100644
--- a/checks/megaraid_bbu
+++ b/checks/megaraid_bbu
@@ -82,11 +82,14 @@ def check_megaraid_bbu(item, _no_params, info):
# verify defined important parameters to current level
for varname, (refvalue, refstate) in megaraid_bbu_refvalues.items():
- value = controller[varname]
- # build a list of all errors
- if controller[varname] != refvalue:
- broken.append("%s is %s, but should be %s(%s)" % (varname, value,
refvalue, "!" * refstate))
- state = max(state, refstate)
+ try:
+ value = controller[varname]
+ # build a list of all errors
+ if controller[varname] != refvalue:
+ broken.append("%s is %s, but should be %s(%s)" % (varname, value,
refvalue, "!" * refstate))
+ state = max(state, refstate)
+ except:
+ pass
# return assembled info
if broken: