Module: check_mk
Branch: master
Commit: 5a608096cd4d8802e8fd6e4aa8e447415d175576
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5a608096cd4d88…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri May 18 15:07:18 2018 +0200
6130 FIX ipmi: Fixed unknown device status handling
Change-Id: I1239df9fa9870da7e8e607318106e580eae3bd16
---
.werks/6130 | 10 ++++++++++
checks/ipmi_sensors.include | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/6130 b/.werks/6130
new file mode 100644
index 0000000..1ade190
--- /dev/null
+++ b/.werks/6130
@@ -0,0 +1,10 @@
+Title: ipmi: Fixed unknown device status handling
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1526648815
+Class: fix
+
+
diff --git a/checks/ipmi_sensors.include b/checks/ipmi_sensors.include
index d63d498..5c6eb73 100644
--- a/checks/ipmi_sensors.include
+++ b/checks/ipmi_sensors.include
@@ -185,7 +185,9 @@ def inventory_freeipmi(parsed):
def freeipmi_status_txt_mapping(status_txt):
- if status_txt in [ "OK", "Entity Present", "battery presence
detected",
+ if status_txt is None:
+ return 3
+ elif status_txt in [ "OK", "Entity Present", "battery
presence detected",
"Drive Presence", "transition to Running", "Device
Enabled" ] or \
status_txt.startswith("Fully Redundant") or \
status_txt.endswith("is connected") or \