Module: check_mk
Branch: master
Commit: b1a96428f32d20f524db4a4a19859b96615954d8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b1a96428f32d20…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Aug 2 10:35:57 2016 +0200
3711 FIX ipmi: fixed wrong status handling if sensor status is ok but failures detected
---
.werks/3711 | 10 ++++++++++
ChangeLog | 1 +
checks/ipmi | 16 +++++++++-------
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/.werks/3711 b/.werks/3711
new file mode 100644
index 0000000..50e37e1
--- /dev/null
+++ b/.werks/3711
@@ -0,0 +1,10 @@
+Title: ipmi: fixed wrong status handling if sensor status is ok but failures detected
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1470126829
+
+
diff --git a/ChangeLog b/ChangeLog
index 1417ca9..7a57a45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -322,6 +322,7 @@
* 3727 FIX: fc_port: Fixed broken interpretation of counter values leading to wrong
measurements
* 3731 FIX: sap.value-groups: Replaced this check with sap.value_groups...
* 3742 FIX: ps: Fixed broken averaging...
+ * 3711 FIX: ipmi: fixed wrong status handling if sensor status is ok but failures
detected
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/ipmi b/checks/ipmi
index cb18678..5b49124 100644
--- a/checks/ipmi
+++ b/checks/ipmi
@@ -104,11 +104,13 @@
# Fan 2 | 8557.000 | RPM | ok | na | 1720.000 | 1978.000
| na | na | na
# Fan 3 | 7611.000 | RPM | ok | na | 1720.000 | 1978.000
| na | na | na
# <<<ipmi_discrete:sep(124)>>>
-# PS3 Status | C8h | ok | 10.1 | Presence detected
-# PS4 Status | C9h | ok | 10.2 | Presence detected
-# Pwr Unit Stat | 01h | ok | 21.1 |
-# Power Redundancy | 02h | ok | 21.1 | Fully Redundant
-# BMC Watchdog | 03h | ok | 7.1 |
+# PS3 Status | C8h | ok | 10.1 | Presence detected
+# PS4 Status | C9h | ok | 10.2 | Presence detected
+# Pwr Unit Stat | 01h | ok | 21.1 |
+# Power Redundancy | 02h | ok | 21.1 | Fully Redundant
+# BMC Watchdog | 03h | ok | 7.1 |
+# PS1 Status | C8h | ok | 10.1 | Presence detected, Failure detected <= NOT
OK !!
+# PS2 Status | C9h | ok | 10.2 | Presence detected
ipmi_summarize = True
@@ -207,7 +209,7 @@ def check_ipmi_detailed(item, parsed):
else:
perfdata = []
- if status.startswith('ok'):
+ if status.startswith('ok') and not "failure detected" in
status.lower():
state = 0
elif status.startswith('nc'):
state = 1
@@ -248,7 +250,7 @@ def check_ipmi_summarized(parsed, params):
elif status.startswith('nr') and ipmi_ignore_nr:
pass
- elif not status.startswith('ok'):
+ elif not status.startswith('ok') or "failure detected" in
status.lower():
worst_status = 2
crit_texts.append(infotext)