Module: check_mk
Branch: master
Commit: 7b69a40cbc2a87fec7b631404e8ce3091e0e3425
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7b69a40cbc2a87…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Feb 22 14:24:41 2017 +0100
4415 FIX blade_bays: fixed KeyError
Change-Id: Ib3dfd0595a12486bcdc5a4d5c786185799398ba2
---
.werks/4415 | 9 +++++++++
checks/blade_bays | 4 +++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4415 b/.werks/4415
new file mode 100644
index 0000000..393fc19
--- /dev/null
+++ b/.werks/4415
@@ -0,0 +1,9 @@
+Title: blade_bays: fixed KeyError
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0b3
+Date: 1487769557
+Class: fix
+
+
diff --git a/checks/blade_bays b/checks/blade_bays
index f5f8fdc..e41e786 100644
--- a/checks/blade_bays
+++ b/checks/blade_bays
@@ -59,12 +59,14 @@ def parse_blade_bays(info):
"device_state" : map_states.get(state, (3,
"unhandled[%s]" % state)),
"power" : power,
})
+
+ pprint.pprint(parsed)
return parsed
def inventory_blade_bays(parsed):
for entry, attrs in parsed.items():
- if attrs["device_state"][1] in [ "standby", "on"
]:
+ if attrs["_device_state_"][1] in [ "standby", "on"
]:
yield entry, {}