Module: check_mk
Branch: master
Commit: 3ed0ee770d69a9dec605ca3aad8cf77f7ad9820f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3ed0ee770d69a9…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Aug 4 09:51:09 2017 +0200
Fixed gude_powerbanks parse function
Change-Id: I2955be675b4c15f94976f4aa555b1721cde54831
---
checks/gude_powerbanks | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/checks/gude_powerbanks b/checks/gude_powerbanks
index faaa792..0a7372b 100644
--- a/checks/gude_powerbanks
+++ b/checks/gude_powerbanks
@@ -53,11 +53,15 @@ def parse_gude_powerbanks(info):
current_str, volt_str, freq_str, appower_str in info[1]:
oid, idx = oid_idx.split(".")
+ device_state = None
if oid in ["19"]:
device_state = map_port_states[ports[oid_idx]]
if oid in ["38"]:
device_state = map_channel_states[device_state]
+ if device_state is None:
+ continue
+
parsed.setdefault(idx, {
"device_state" : device_state
})