Module: check_mk
Branch: master
Commit: 06ee40983b43a9e438cda4279b96d4efb0abedef
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=06ee40983b43a9…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Dec 18 16:13:15 2014 +0100
#1519 etherbox.temp: Now supports lower levels, output configurable to Celsius, Fahrenheit
or Kelvin
etherbox.temp now no longer uses the room temperature WATO rule, but the new
"temperature" rule, note that the
old rule no longer applies to etherbox. The new rule allows to set lower levels, as well
as output in
Celsius, Fahrenheit or Kelvin.
---
.werks/1519 | 11 +++++++++++
ChangeLog | 2 ++
checks/etherbox | 21 ++++-----------------
checks/hwg_temp | 2 +-
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/.werks/1519 b/.werks/1519
new file mode 100644
index 0000000..13ad5c6
--- /dev/null
+++ b/.werks/1519
@@ -0,0 +1,11 @@
+Title: etherbox.temp: Now supports lower levels, output configurable to Celsius,
Fahrenheit or Kelvin
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i1
+Date: 1418915146
+Class: feature
+
+etherbox.temp now no longer uses the room temperature WATO rule, but the new
"temperature" rule, note that the
+old rule no longer applies to etherbox. The new rule allows to set lower levels, as well
as output in
+Celsius, Fahrenheit or Kelvin.
diff --git a/ChangeLog b/ChangeLog
index 101f197..85501eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@
* 1207 services: Check can now be configured with additional names for matching...
* 1786 casa_cpu_mem, casa_cpu_temp, casa_cpu_util, casa_fan, casa_power: support more
devices, also C100G
* 1787 docsis_channels_upstream, docsis_channels_downstream: now also support CASA
100G
+ * 1519 etherbox.temp: Now supports lower levels, output configurable to Celsius,
Fahrenheit or Kelvin...
+ 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/checks/etherbox b/checks/etherbox
index 49943c6..95271d8 100644
--- a/checks/etherbox
+++ b/checks/etherbox
@@ -83,33 +83,20 @@ def check_etherbox_temp(item, params, info):
except Exception, error:
return 3, error.message
- uom = { "0": "°C", "1": "°F", "2":
"K" }[info[0][0][0]]
- state = 0
-
+ uom = { "0": "c", "1": "f", "2":
"k" }[info[0][0][0]]
temp = int(value) / 10.0
- levels_text = ""
- if params:
- warn, crit = params
- levels_text = " (warn/crit at %.1f/%.1f %s)" % (warn, crit, uom)
- if temp > crit:
- state = 2
- elif temp > warn:
- state = 1
- else:
- warn, crit = None, None
+ return check_temperature(temp, params, uom)
- perfdata = [ ("temp", temp, warn, crit) ]
- infotext = "%s: Temperature %.1f %s %s" % (name, temp, uom, levels_text)
- return (state, infotext, perfdata)
check_info["etherbox.temp"] = {
"check_function" : check_etherbox_temp,
"inventory_function" : lambda x: inventory_etherbox(x, "1"),
"service_description" : "Sensor %s",
"has_perfdata" : True,
- "group" : "room_temperature",
+ "group" : "temperature",
"snmp_scan_function" : etherbox_scan,
"snmp_info" : etherbox_info,
+ "includes" : [ "temperature.include" ],
}
def check_etherbox_humidity(item, params, info):
diff --git a/checks/hwg_temp b/checks/hwg_temp
index 87b0757..c8ffe66 100644
--- a/checks/hwg_temp
+++ b/checks/hwg_temp
@@ -95,7 +95,7 @@ check_info['hwg_temp'] = {
"1.7",
]),
"snmp_scan_function" : lambda oid: "hwg" in
oid(".1.3.6.1.2.1.1.1.0").lower(),
- "group" : "room_temperature",
+ "group" : "temperature",
"includes" : [ "temperature.include" ],
}