Module: check_mk
Branch: master
Commit: c50d2f849df4ee85d41f8de554e6124d3f05a068
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c50d2f849df4ee…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Jan 19 17:53:40 2015 +0100
#1523 lnx_thermal: Now supports setting levels
lnx_thermal can now be configured via the Temperature WATO Rule.
Default behaviour uses trip points if present, otherwise user defined levels.
Due to a changed item name, re-inventory is required.
---
.werks/1523 | 11 +++++++++++
ChangeLog | 2 ++
checkman/lnx_thermal | 38 +++++++++++++++++++++++++-------------
3 files changed, 38 insertions(+), 13 deletions(-)
diff --git a/.werks/1523 b/.werks/1523
new file mode 100644
index 0000000..576a76a
--- /dev/null
+++ b/.werks/1523
@@ -0,0 +1,11 @@
+Title: lnx_thermal: Now supports setting levels
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i1
+Date: 1421686301
+Class: feature
+
+lnx_thermal can now be configured via the Temperature WATO Rule.
+Default behaviour uses trip points if present, otherwise user defined levels.
+Due to a changed item name, re-inventory is required.
diff --git a/ChangeLog b/ChangeLog
index 0cf7f34..7284b35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,8 @@
* 1849 netscaler_dnsrates: new check for DNS statistics of Citrix Netscaler
Loadbalancers
* 1850 netscaler_health.fan, netscaler_health.psus, netscaler_health.temp: new checks
to monitor the health of Citrix Netscaler Loadbalancers
* 1214
ups_bat_temp,ups_capacity,ups_in_freq,ups_in_voltage,ups_out_load,ups_out_voltage: Checks
now detect more UPS Devices...
+ * 1523 lnx_thermal: Now supports setting levels...
+ NOTE: Please refer to the migration notes!
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checkman/lnx_thermal b/checkman/lnx_thermal
index 0418214..390f013 100644
--- a/checkman/lnx_thermal
+++ b/checkman/lnx_thermal
@@ -4,25 +4,37 @@ catalog: os/hardware
license: GPL
distribution: check_mk
description:
- This check uses the temperature information provided by the kernel in
+ This check monitors the temperature provided by the kernel in
/sys/class/thermal/thermal_zone* and reports values in °C
- The measured value is matched against levels delivered by the kernel.
- Returns {CRIT} if the kernel reports {hot} or {critical} state,
- {WARN} on any other non ok state and {OK} if the temperature is
- considered to be within normal operation temperature levels.
-
item:
- The ID of the thermal zone
-
-examples:
- # adding a check for /sys/class/thermal/thermal_zone0
- checks += [
- ( "localhost", "lnx_thermal", "0", None )
- ]
+ "Zone "+(The ID of the thermal zone)
perfdata:
One value: The current temperature in °C
inventory:
Creates one check for earch thermal zone.
+
+[parameters]
+This checks parameters are a dictionary with the
+following (optional) keys:
+
+ {"levels"}: A tuple (warn, crit) containing the upper levels. Default: (70,
80)
+
+ {"levels_lower"}: A tuple (warn, crit) containing the lower levels. No
defaults.
+
+ {"output_unit"}: "c", "f" or "k", the check will
output the temperature in the
+specified unit. If this is not set, output is in degrees Celsius.
+
+ {"input_unit"}: "c, "f" or "k". By default, the check
interprets the sensor value
+according to the unit sent by the device. This key allows to override that. Tread
+lightly, as this may lead to a misinterpreted temperature. Should only be used if
+the device reports its unit incorrectly.
+
+ {"device_levels_handling"]: How the check treats the device's internal
levels
+versus the ones you specify yourself. The following options are supported:
"best"
+results in the best status between yours and the device's levels, "worst"
in the
+worst, "usr" ignore's the device's levels, "dev" ignores
yours, usrdefault and
+devdefault uses your/the devices set of levels if present, otherwise the other
+respectively. Default setting is "devdefault"