Module: check_mk
Branch: master
Commit: dc2ef13f0bd5fdbb48ffe87d13cfd53f58ea81c1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dc2ef13f0bd5fd…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jan 30 13:12:33 2017 +0100
4306 FIX cisco_fru_power: fixed empty FRU current handling
Change-Id: Ife2e06cd3bcecb62f9306626e07865df426e9edb
---
.werks/4306 | 10 ++++++++++
ChangeLog | 1 +
checks/cisco_fru_power | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/4306 b/.werks/4306
new file mode 100644
index 0000000..58d6995
--- /dev/null
+++ b/.werks/4306
@@ -0,0 +1,10 @@
+Title: cisco_fru_power: fixed empty FRU current handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i4
+Date: 1485778312
+
+
diff --git a/ChangeLog b/ChangeLog
index 02b4fc7..e6a1f2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,6 +78,7 @@
* 4305 FIX: postgres_stat_database.size: fixed missing database size perfometer
* 4313 FIX: ps: Improved performance of ps check on systems with a large number of
processes
* 4016 FIX: Windows Agents: fixed broken custom windows performance counter
monitoring (winperf section)
+ * 4306 FIX: cisco_fru_power: fixed empty FRU current handling
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can
now be configured via global settings....
diff --git a/checks/cisco_fru_power b/checks/cisco_fru_power
index 517642a..7ca7e8a 100644
--- a/checks/cisco_fru_power
+++ b/checks/cisco_fru_power
@@ -86,7 +86,8 @@ def parse_cisco_fru_power(info):
ppre_parsed = {}
for end_oid, oper_state, fru_current in info[0]:
- if oper_state not in [ "", "0", "1", "5"
] and int(fru_current) >= 0:
+ if oper_state not in [ "", "0", "1", "5"
] and \
+ fru_current and int(fru_current) >= 0:
ppre_parsed.setdefault(end_oid, map_states.get(oper_state, (3,
"unexpected(%s)" % oper_state)))
pre_parsed = {}