Module: check_mk
Branch: master
Commit: 077c3baab1617796da3e61ade7430d8d869cd5f9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=077c3baab16177…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Sep 2 16:22:03 2014 +0200
Convert several temperature checks to same output format
Temperature is %d °C
Note: space before degree symbol.
---
checks/akcp_daisy_temp | 2 +-
checks/akcp_sensor_temp | 2 +-
checks/apc_symmetra | 10 +++++-----
checks/arris_cmts_temp | 2 +-
checks/cisco_temp_sensor | 2 +-
checks/dell_powerconnect_temp | 2 +-
checks/enterasys_temp | 2 +-
checks/f5_bigip_temp | 2 +-
checks/lnx_thermal | 2 +-
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/checks/akcp_daisy_temp b/checks/akcp_daisy_temp
index 5ae90ef..73c5b76 100644
--- a/checks/akcp_daisy_temp
+++ b/checks/akcp_daisy_temp
@@ -42,7 +42,7 @@ def check_akcp_daisy_temp(item, params, info):
if name == item:
warn, crit = params
temp = savefloat(temp) / 10
- infotext = "Temperature is: %.1f °C " % temp
+ infotext = "Temperature is %.1f °C " % temp
levels = " (warn/crit at %.1f/%.1f °C)" % (warn, crit)
perfdata = [ ( "temperature", temp, warn, crit ) ]
if temp >= crit:
diff --git a/checks/akcp_sensor_temp b/checks/akcp_sensor_temp
index bc7c1e6..e3cbff6 100644
--- a/checks/akcp_sensor_temp
+++ b/checks/akcp_sensor_temp
@@ -56,7 +56,7 @@ def check_akcp_sensor_temp(item, params, info):
if unit == "F":
temp = to_celsius(temp)
unit = "C"
- infotext = "Temperature is: %.1f °%s" % ( temp, unit)
+ infotext = "Temperature is %.1f °%s" % (temp, unit)
levels = " (warn/crit at %1f/%1f °%s)" % ( warn, crit, unit
)
perfdata = [ ( "temperature", temp, warn, crit ) ]
if temp >= crit:
diff --git a/checks/apc_symmetra b/checks/apc_symmetra
index ad66673..525fef2 100644
--- a/checks/apc_symmetra
+++ b/checks/apc_symmetra
@@ -163,7 +163,7 @@ def check_apc(item, params, info):
# 5. Check System temperature
# The Name AdvBatteryTemperature is a wrong naming in the vendor mib.
- infotxt = "sys. temp. %dC" % AdvBatteryTemperature
+ infotxt = "sys. temp. %d °C" % AdvBatteryTemperature
if AdvBatteryTemperature >= crit_sys_temp:
state = 2
infotxt += "(!!)"
@@ -172,7 +172,7 @@ def check_apc(item, params, info):
single_states.append( (state, infotxt, ("systemp", AdvBatteryTemperature,
"", crit_sys_temp) ) )
# 6. Check battery current
- infotxt = "bat. curr. %dA" % AdvBatteryCurrent
+ infotxt = "bat. curr. %d A" % AdvBatteryCurrent
if AdvBatteryCurrent >= crit_batt_curr:
state = 2
infotxt += "(!!)"
@@ -181,10 +181,10 @@ def check_apc(item, params, info):
single_states.append( (state, infotxt, ("batcurr", AdvBatteryCurrent,
"", crit_batt_curr, 0) ) )
# 6a. Simply show input voltage (no performance data)
- single_states.append( (0, "input voltage %dV" % AdvInputVoltage, None) )
+ single_states.append( (0, "input voltage %d V" % AdvInputVoltage, None) )
# 7. Check output voltage
- infotxt = "output voltage %dV" % AdvOutputVoltage
+ infotxt = "output voltage %d V" % AdvOutputVoltage
if AdvOutputVoltage <= crit_voltage:
state = 2
infotxt += "(!!)"
@@ -193,7 +193,7 @@ def check_apc(item, params, info):
single_states.append( (state, infotxt, ("voltage", AdvOutputVoltage,
"", crit_voltage, 0) ) )
# 8. Simply add output current as perfdata
- single_states.append( (0, "output current %dA" % AdvOutputCurrent,
("current", AdvOutputCurrent)) )
+ single_states.append( (0, "output current %d A" % AdvOutputCurrent,
("current", AdvOutputCurrent)) )
# 9. run time remaining
# RunTimeRemaining formatiert == "26:00.00"
diff --git a/checks/arris_cmts_temp b/checks/arris_cmts_temp
index 8627db5..28579f7 100644
--- a/checks/arris_cmts_temp
+++ b/checks/arris_cmts_temp
@@ -37,7 +37,7 @@ def check_arris_cmts_temp(item, params, info):
if name == item:
temp = int(temp)
warn, crit = params
- infotext = "Temperature is: %.1f °C " % temp
+ infotext = "Temperature is %.1f °C " % temp
levels = " (warn/crit at %.1f/%.1f °C)" % (warn, crit)
perfdata = [ ( "temperature", temp, warn, crit ) ]
if temp >= crit:
diff --git a/checks/cisco_temp_sensor b/checks/cisco_temp_sensor
index 259cd06..db91f8e 100644
--- a/checks/cisco_temp_sensor
+++ b/checks/cisco_temp_sensor
@@ -161,7 +161,7 @@ def check_cisco_temp_sensor(item, params, info):
else:
warn, crit = levels[0:2]
- infotext = "Temperature is: %.1f °C " % temp
+ infotext = "Temperature is %.1f °C " % temp
levels = " (warn/crit at %.1f/%.1f °C)" % (warn, crit)
perfdata = [ ( "temperature", temp, warn, crit ) ]
state = 0
diff --git a/checks/dell_powerconnect_temp b/checks/dell_powerconnect_temp
index 190d622..7a430cb 100644
--- a/checks/dell_powerconnect_temp
+++ b/checks/dell_powerconnect_temp
@@ -78,7 +78,7 @@ def check_dell_powerconnect_temp(_no_item, params, info):
else:
status = dell_powerconnect_temp_status2nagios_map[dell_powerconnect_status]
- return (status, 'The temperature sensor is currently (%s)%s, and the current
temperature is %sC%s' %
+ return (status, 'The temperature sensor is currently (%s)%s, and the current
temperature is %s °C%s' %
(dell_powerconnect_temp_status_map[state], sensor_info, temp,
temp_info), [
("temperature", int(temp), warn, crit, 0, 200),
])
diff --git a/checks/enterasys_temp b/checks/enterasys_temp
index 10536df..c25d9eb 100644
--- a/checks/enterasys_temp
+++ b/checks/enterasys_temp
@@ -44,7 +44,7 @@ def check_enterasys_temp(item, params, info):
temp_c = float("%0.1f" % temp_c)
perfdata = [ ("temp", str(temp_c) + "C", warn, crit) ]
- infotext = "Temperature is %0.1f C (warn/crit at %0.1f/%0.1f C)" % (temp_c,
warn, crit)
+ infotext = "Temperature is %0.1f °C (warn/crit at %0.1f/%0.1f °C)" %
(temp_c, warn, crit)
status = 0
if temp_c >= crit:
status = 2
diff --git a/checks/f5_bigip_temp b/checks/f5_bigip_temp
index 44b23b5..2f3107c 100644
--- a/checks/f5_bigip_temp
+++ b/checks/f5_bigip_temp
@@ -68,7 +68,7 @@ def check_f5_bigip_temp(item, params, info):
for sensor in f5_bigip_temp_genitem(info):
if item == sensor[0]:
tmpdiff = sensor[1] - sensor[2]
- msgtxt = "Temperature is %dC" % (sensor[1])
+ msgtxt = "Temperature is %d °C" % (sensor[1])
perfdata = [ ("temp", sensor[1]) ]
if 5 >= tmpdiff:
return (0, msgtxt, perfdata)
diff --git a/checks/lnx_thermal b/checks/lnx_thermal
index be808ec..6ccde87 100644
--- a/checks/lnx_thermal
+++ b/checks/lnx_thermal
@@ -62,7 +62,7 @@ def check_lnx_thermal(item, params, info):
if tp_reached:
detail_txt = ' (Trip Points reached: %s)' % ',
'.join(tp_reached)
- return (state, 'Temperature is %dC%s' % (cur, detail_txt), [ (
'temperature', cur ) ])
+ return (state, 'Temperature is %d °C%s' % (cur, detail_txt), [ (
'temperature', cur ) ])
return (3, 'No data found for sensor "thermal_zone%s"' % item)
check_info['lnx_thermal'] = {