Module: check_mk
Branch: master
Commit: 384844a4cabb1e35f3e84d09ac626b05de451e4b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=384844a4cabb1e…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Apr 15 15:35:41 2016 +0200
3412 stulz_temp: now has readable sensor names and discovers all possible sensors which
are connected
---
.werks/3412 | 9 +++++
ChangeLog | 2 ++
checks/stulz_temp | 94 +++++++++++++++++++++++++++++++++++++++++------------
3 files changed, 84 insertions(+), 21 deletions(-)
diff --git a/.werks/3412 b/.werks/3412
new file mode 100644
index 0000000..d345c49
--- /dev/null
+++ b/.werks/3412
@@ -0,0 +1,9 @@
+Title: stulz_temp: now has readable sensor names and discovers all possible sensors which
are connected
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.9i1
+Date: 1460727255
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 51f6a99..b2b16de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,8 @@
* 3027 mtr (Matt's traceroute): New agent plugin...
* 3410 ipmi: now monitors compact/discrete sensors...
* 3411 mysql_slave: now max time and related state can be configured if slave-IO and
slave-SQL are not running
+ * 3412 stulz_temp: now has readable sensor names and discovers all possible sensors
which are connected
+ NOTE: Please refer to the migration notes!
* 3073 FIX: windows agent: relative paths to mrpe scripts are now treated as relative
to the agent installation directory...
* 3061 FIX: mk_jolokia: Fixed debugging of the agent plugin
* 3074 FIX: windows agent: fixed incorrect values for 32-bit performance counters
diff --git a/checks/stulz_temp b/checks/stulz_temp
index 573cd78..ef8f7cb 100644
--- a/checks/stulz_temp
+++ b/checks/stulz_temp
@@ -25,34 +25,86 @@
# Boston, MA 02110-1301 USA.
-# TODO: This device provides multiple temperature readings, currently
-# only one is evaluated: "Return Air"
-# Right now the items are not named according to the guideline
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1170.1.1.1 220 -->
Stulz-WIB8000-MIB::unitAirTemperature.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1170.1.2.1 216 -->
Stulz-WIB8000-MIB::unitAirTemperature.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1175.1.1.1 220 -->
Stulz-WIB8000-MIB::unitSetpointAirTratureCorrected.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1175.1.2.1 220 -->
Stulz-WIB8000-MIB::unitSetpointAirTratureCorrected.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1192.1.1.1 221 -->
Stulz-WIB8000-MIB::unitReturnAirTemperature.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1192.1.2.1 216 -->
Stulz-WIB8000-MIB::unitReturnAirTemperature.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1193.1.1.1 220 -->
Stulz-WIB8000-MIB::unitSupplyAirTemperature.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1193.1.2.1 214 -->
Stulz-WIB8000-MIB::unitSupplyAirTemperature.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1196.1.2.1 83 -->
Stulz-WIB8000-MIB::unitOutsideAirTemperature.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.2.1.1.1171.1.1.1 418 -->
Stulz-WIB8000-MIB::unitHumidity.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.2.1.1.1171.1.2.1 420 -->
Stulz-WIB8000-MIB::unitHumidity.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.2.1.1.1178.1.1.1 500 -->
Stulz-WIB8000-MIB::unitSetpointHumidityCorrected.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.2.1.1.1178.1.2.1 500 -->
Stulz-WIB8000-MIB::unitSetpointHumidityCorrected.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.2.1.1.1194.1.1.1 418 -->
Stulz-WIB8000-MIB::unitReturnAirHumidity.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.2.1.1.1194.1.2.1 419 -->
Stulz-WIB8000-MIB::unitReturnAirHumidity.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.2.1.1.1195.1.1.1 421 -->
Stulz-WIB8000-MIB::unitSupplyAirHumidity.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.2.1.1.1195.1.2.1 425 -->
Stulz-WIB8000-MIB::unitSupplyAirHumidity.1.2.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.3.1.1.1208.1.1.1 11 -->
Stulz-WIB8000-MIB::currentRaisedFloorPressure.1.1.1
+# .1.3.6.1.4.1.29462.10.2.1.1.1.1.3.1.1.1208.1.2.1 16 -->
Stulz-WIB8000-MIB::currentRaisedFloorPressure.1.2.1
factory_settings["stulz_temp_default_levels"] = {
"levels": (25, 28)
}
-def inventory_stulz_temp(info):
- for line in info:
- yield line[0], {}
-def check_stulz_temp(item, params, info):
- for line in info:
- if line[0] == item:
- return check_temperature(int(line[1])/10, params, "stulz_temp_%s" %
item)
+def parse_stulz_temp(info):
+ map_types = {
+ "1170" : "unit air",
+ "1192" : "unit return air",
+ "1193" : "unit supply air",
+ "1196" : "unit outside air",
+ "1243" : "unit supply 3",
+ "1244" : "unit return air 2",
+ "1245" : "unit return air 3",
+ "1246" : "unit return air temrn",
+ "1247" : "unit return air temly",
+ "1248" : "unit supply air 2",
+ "10210" : "condensor",
+ "10211" : "supply 1",
+ "10212" : "supply 2",
+ "10264" : "FCB room air",
+ "10266" : "supply air comfort unit 1",
+ "10267" : "supply air comfort unit 2",
+ "10268" : "FCB outside air",
+ }
-check_info["stulz_temp"] = {
- "check_function" : check_stulz_temp,
- "inventory_function" : inventory_stulz_temp,
- "service_description" : "Temperature %s",
- "has_perfdata" : True,
- "group" : "temperature",
- "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0")
== ".1.3.6.1.4.1.29462.10",
- "snmp_info" : (
".1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1.1192", [ OID_END, 1] ),
- "includes" : [ "temperature.include" ],
- "default_levels_variable": "stulz_temp_default_levels"
+ parsed = {}
+ for oidend, reading_str in info:
+ oids = oidend.split(".")
+ temp_ty = oids[0]
+ index = oids[2]
+ if temp_ty in map_types:
+ itemname = "%s-%s" % (map_types[temp_ty], index)
+ parsed.setdefault(itemname, float(reading_str)/10)
+
+ return parsed
+
+
+def inventory_stulz_temp(parsed):
+ for item in parsed:
+ yield item, {}
-}
+def check_stulz_temp(item, params, parsed):
+ if item in parsed:
+ return check_temperature(parsed[item], params, "stulz_temp_%s" % item)
+
+
+check_info["stulz_temp"] = {
+ "parse_function" : parse_stulz_temp,
+ "inventory_function" : inventory_stulz_temp,
+ "check_function" : check_stulz_temp,
+ "service_description" : "Temperature %s",
+ "has_perfdata" : True,
+ "group" : "temperature",
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0")
== ".1.3.6.1.4.1.29462.10",
+ "snmp_info" : (
".1.3.6.1.4.1.29462.10.2.1.1.1.1.1.1.1", [
+ OID_END, "",
+ ]),
+ "includes" : [ "temperature.include" ],
+ "default_levels_variable" : "stulz_temp_default_levels"
+}