Module: check_mk
Branch: master
Commit: 5ac8f54745aa2b9d5bdeff16ab4133e8e162eee4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ac8f54745aa2b…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Aug 7 18:20:12 2017 +0200
fixed bug in handling from binary translated code
Change-Id: I7b12cd71bfb4edfd20240b037903eae05e18c78e
---
checks/hp_mcs_system | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/checks/hp_mcs_system b/checks/hp_mcs_system
index f64a575..bf495ab 100644
--- a/checks/hp_mcs_system
+++ b/checks/hp_mcs_system
@@ -34,14 +34,14 @@ def inventory_hp_mcs_system(info):
def check_hp_mcs_system(item, _no_params, info):
translate_status = {
- "00" : (2, "Not available" ),
- "01" : (3, "Other" ),
- "02" : (0, "OK" ),
- "03" : (1, "Degraded" ),
- "04" : (2, "Failed" ),
+ 0 : (2, "Not available" ),
+ 1 : (3, "Other" ),
+ 2 : (0, "OK" ),
+ 3 : (1, "Degraded" ),
+ 4 : (2, "Failed" ),
}
serial = info[0][2]
- idx1, status, idx2, dev_type = info[0][1].split(" ")
+ idx1, status, idx2, dev_type = info[0][1]
state, state_readable = translate_status[status]
if state:
yield state, "Status: %s" % state_readable