Module: check_mk
Branch: master
Commit: c8372e573794bd69bbf51fae9ff549f392216d59
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c8372e573794bd…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Jan 24 17:46:51 2018 +0100
5602 FIX ups_modulys_alarms: Make check handle devices outputting NULL instead of integer
type flags on some values
Change-Id: Ia80ed310f72fde114cbc4d27b8ea99afdd10c2a8
---
.werks/5602 | 11 +++++++++++
checks/ups_modulys_alarms | 4 ++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/5602 b/.werks/5602
new file mode 100644
index 0000000..60624f0
--- /dev/null
+++ b/.werks/5602
@@ -0,0 +1,11 @@
+Title: ups_modulys_alarms: Make check handle devices outputting NULL instead of integer
type flags on some values
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i3
+Date: 1516812347
+
+
diff --git a/checks/ups_modulys_alarms b/checks/ups_modulys_alarms
index 0481fbf..e945bbf 100644
--- a/checks/ups_modulys_alarms
+++ b/checks/ups_modulys_alarms
@@ -64,9 +64,9 @@ def check_ups_modulys_alarms(_no_item, _no_params, info):
'29' : (2, 'Output breaker open'),
}
+ result = False
for oidend, flag in info:
- result = False
- if flag and int(flag):
+ if flag and flag != "NULL" and int(flag):
result = True
yield oiddef[oidend]