Module: check_mk
Branch: master
Commit: 74e418ce3371bac03eb7e3564db35a09be4bc076
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=74e418ce3371ba…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jul 27 13:06:49 2012 +0200
added perf-o-meters for a lot of temperature checks
---
ChangeLog | 1 +
web/plugins/perfometer/check_mk.py | 19 +++++++++++++++----
web/plugins/wato/check_parameters.py | 4 ++--
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9076b4a..2982234 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
* vms_system.procs: new check for number of processes on OpenVMS
* FIX: mssql agent: Added compatibility code for MSSQL 9
* f5_bigip_temp: add performance data
+ * added perf-o-meters for a lot of temperature checks
WATO:
* Added permission to control the "clone host" feature in WATO
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 7b9557f..43c719e 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -184,7 +184,7 @@ perfometers["check_mk-ntp"] =
perfometer_check_mk_ntp
perfometers["check_mk-ntp.time"] = perfometer_check_mk_ntp
perfometers["check_mk-systemtime"] = lambda r, c, p: perfometer_check_mk_ntp(r,
c, p, "s")
-def perfometer_temperature(row, check_command, perf_data):
+def perfometer_ipmi_sensors(row, check_command, perf_data):
state = row["service_state"]
color = { 0: "#39f", 1: "#ff2", 2: "#f22", 3:
"#fa2" }[state]
value = float(perf_data[0][1])
@@ -213,7 +213,7 @@ def perfometer_temperature(row, check_command, perf_data):
unit = ""
return (u"%d%s" % (int(value), unit)), h
-perfometers["check_mk-ipmi_sensors"] = perfometer_temperature
+perfometers["check_mk-ipmi_sensors"] = perfometer_ipmi_sensors
def perfometer_temperature(row, check_command, perf_data):
state = row["service_state"]
@@ -222,8 +222,6 @@ def perfometer_temperature(row, check_command, perf_data):
crit = savefloat(perf_data[0][4])
return "%d°C" % int(value), perfometer_logarithmic(value, 40, 1.2, color)
-
-# Also all checks dealing with temperature can use this perfometer
perfometers["check_mk-nvidia.temp"] = perfometer_temperature
perfometers["check_mk-cisco_temp_sensor"] = perfometer_temperature
perfometers["check_mk-cisco_temp_perf"] = perfometer_temperature
@@ -235,6 +233,19 @@ perfometers["check_mk-hp_proliant_temp"] =
perfometer_temperature
perfometers["check_mk-akcp_sensor_temp"] = perfometer_temperature
perfometers["check_mk-fsc_temp"] = perfometer_temperature
+def perfometer_blower(row, check_command, perf_data):
+ rpm = saveint(perf_data[0][1])
+ perc = rpm / 10000.0 * 100.0
+ return "%d RPM" % rpm, perfometer_logarithmic(rpm, 2000, 1.5,
"#88c")
+
+perfometers["check_mk-cmctc_lcp.blower"] = perfometer_blower
+
+def perfometer_lcp_regulator(row, check_command, perf_data):
+ value = saveint(perf_data[0][1])
+ return "%d%%" % value, perfometer_linear(value, "#8c8")
+
+perfometers["check_mk-cmctc_lcp.regulator"] = perfometer_lcp_regulator
+
def perfometer_bandwidth(in_bytes, out_bytes, in_bw, out_bw):
txt = []
have_bw = True
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 68ee915..9a66d11 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1522,8 +1522,8 @@ checkgroups.append((
"for monitoring the temperature of a datacenter. An example "
"is the webthem from W&T."),
elements = [
- Integer(title = "warning at", unit = u"°C"),
- Integer(title = "critical at", unit = u"°C"),
+ Integer(title = "warning at", unit = u"°C", default_value
= 26),
+ Integer(title = "critical at", unit = u"°C",
default_value = 30),
]),
TextAscii(
title = _("Sensor ID"),