Module: check_mk
Branch: master
Commit: 10de26645d10d7d6b7e72d48a1a798cd8a4e8292
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=10de26645d10d7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 7 16:16:41 2011 +0200
ipmi_sensors: correctly handle further positive status texts
---
ChangeLog | 2 ++
checks/ipmi_sensors | 8 ++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e005ba8..c3ef015 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
Checks & Agents:
* Added 4 new checks dell_powerconnect_* by Chris Bowlby
+ * ipmi_sensors: correctly handle further positive status texts
+ (thanks to Sebastian Talmon)
Multisite:
* FIX: WATO filtered status GUIs did not update the title after changing
diff --git a/checks/ipmi_sensors b/checks/ipmi_sensors
index c468ed8..42e7b20 100644
--- a/checks/ipmi_sensors
+++ b/checks/ipmi_sensors
@@ -108,8 +108,12 @@ def check_freeipmi(item, _no_params, info):
perfdata = []
else:
perfdata = [ ("value", current, None, crit) ]
- infotext = "Current value %.1f%s%s" % (current, unit,
levelstext)
- if status == "OK" or
status.startswith("Fully_Redundant"):
+ infotext = "Current value %.1f%s%s" % (current, unit,
levelstext)
+ if status == "OK" \
+ or status == "Entity_Present" \
+ or status.endswith("is_connected") \
+ or status.endswith("Presence_detected") \
+ or status.startswith("Fully_Redundant"):
return (0, "OK - " + infotext, perfdata)
else:
return (2, "CRIT - " + infotext, perfdata)