Module: check_mk
Branch: master
Commit: f87b0fd28fb360a202ff3739812067a849c07ce9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f87b0fd28fb360…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 24 17:05:28 2012 +0100
FIX: fix problem in ipmi_sensors perfometer
---
ChangeLog | 1 +
web/plugins/perfometer/check_mk.py | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b7bd8d8..d484fa6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -224,6 +224,7 @@
* FIX: detail view of host was missing column headers
* FIX: fix problem on IE with background color 'white'
* FIX: fix hitting enter in host search form on IE
+ * FIX: fix problem in ipmi_sensors perfometer
Checks & Agents:
* FIX: fixed man pages of h3c_lanswitch_sensors and statgrab_cpu
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 8252a95..ca05468 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -182,9 +182,12 @@ perfometers["check_mk-systemtime"] = lambda r, c, p:
perfometer_check_mk_ntp(r,
def perfometer_check_mk_ipmi_sensors(row, check_command, perf_data):
state = row["service_state"]
- color = { 0: "#06f", 1: "#ff2", 2: "#f22", 3:
"#fa2" }[state]
+ color = { 0: "#39f", 1: "#ff2", 2: "#f22", 3:
"#fa2" }[state]
value = float(perf_data[0][1])
- crit = float(perf_data[0][4])
+ crit = savefloat(perf_data[0][4])
+ if not crit:
+ return "%d" % int(value), perfometer_logarithmic(value, 40, 1.2,
color)
+
perc = 100 * value / crit
# some sensors get critical if the value is < crit (fans), some if > crit
(temp)
h = '<table><tr>'