Module: check_mk
Branch: master
Commit: a4fc73ce2f4f478ebcbe8e7b349f3b7ab763c1b9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a4fc73ce2f4f47…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Nov 19 18:28:14 2014 +0100
#1517 carel_sensors: New check for monitoring temperature sensors of Carel AC devices
---
.werks/1517 | 9 +++
ChangeLog | 1 +
checkman/carel_sensors | 22 +++++++
checks/carel_sensors | 103 ++++++++++++++++++++++++++++++
pnp-templates/check_mk-carel_sensors.php | 1 +
web/plugins/perfometer/check_mk.py | 1 +
6 files changed, 137 insertions(+)
diff --git a/.werks/1517 b/.werks/1517
new file mode 100644
index 0000000..09875a0
--- /dev/null
+++ b/.werks/1517
@@ -0,0 +1,9 @@
+Title: carel_sensors: New check for monitoring temperature sensors of Carel AC devices
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1416418058
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 25aa3db..19be91d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* 1448 domino_info: check is extended to also show and monitor the
lnNotesServerState
* 1509 if, if64: New option for make inventory based on port alias...
* 1440 livedump: now able to add hosts icon_image on config generation...
+ * 1517 carel_sensors: New check for monitoring temperature sensors of Carel AC
devices
* 1478 FIX: kernel.util, statgrab_cpu: fix computation of utilization...
* 1480 FIX: brocade_vdx_status: disable check on some devices that do not support
it...
* 1485 FIX: dell_om_disks, dell_om_esmlog, dell_om_mem, dell_om_processors,
dell_om_sensors: detect more devices...
diff --git a/checkman/carel_sensors b/checkman/carel_sensors
new file mode 100644
index 0000000..26572a5
--- /dev/null
+++ b/checkman/carel_sensors
@@ -0,0 +1,22 @@
+title: Temperature sensors for Carel air conditioning
+agents: snmp
+catalog: hw/environment/carel
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the temperature for Carel
+ air conditioning devices.
+
+perfdata:
+ The current temperature in degrees celsius
+
+item:
+ The description of the sensor.
+
+inventory:
+ One check for each sensor is created by the inventory if the
+ sensor does not read 0 or -9999.
+
+[parameters]
+warn(int): Warning level for the temperature.
+crit(int): Critical level for the temperature.
diff --git a/checks/carel_sensors b/checks/carel_sensors
new file mode 100644
index 0000000..043958d
--- /dev/null
+++ b/checks/carel_sensors
@@ -0,0 +1,103 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# This is not intended for overriding in main.mk, as any changes will require
+# re-inventory.
+carel_temp_defaultlevels = { # This still needs sensible values
+ "Room" : (30, 35),
+ "Outdoor" : (60, 70),
+ "Delivery" : (60, 70),
+ "Cold Water" : (60, 70),
+ "Hot Water" : (60, 70),
+ "Cold Water Outlet" : (60, 70),
+ "Circuit 1 Suction" : (60, 70),
+ "Circuit 2 Suction" : (60, 70),
+ "Circuit 1 Evap" : (60, 70),
+ "Circuit 2 Evap" : (60, 70),
+ "Circuit 1 Superheat" : (60, 70),
+ "Circuit 2 Superheat" : (60, 70),
+ "Cooling Set Point" : (60, 70),
+ "Cooling Prop. Band" : (60, 70),
+ "Cooling 2nd Set Point" : (60, 70),
+ "Heating Set Point" : (60, 70),
+ "Heating 2nd Set Point" : (60, 70),
+ "Heating Prop. Band" : (60, 70),
+}
+
+def carel_sensors_parse(info):
+
+ oidtothing = {
+ "1.0" : ("temp", "Room"),
+ "2.0" : ("temp", "Outdoor"),
+ "3.0" : ("temp", "Delivery"),
+ "4.0" : ("temp", "Cold Water"),
+ "5.0" : ("temp", "Hot Water"),
+ "7.0" : ("temp", "Cold Water Outlet"),
+ "10.0" : ("temp", "Circuit 1 Suction"),
+ "11.0" : ("temp", "Circuit 2 Suction"),
+ "12.0" : ("temp", "Circuit 1 Evap"),
+ "13.0" : ("temp", "Circuit 2 Evap"),
+ "14.0" : ("temp", "Circuit 1 Superheat"),
+ "15.0" : ("temp", "Circuit 2 Superheat"),
+ "20.0" : ("temp", "Cooling Set Point"),
+ "21.0" : ("temp", "Cooling Prop. Band"),
+ "22.0" : ("temp", "Cooling 2nd Set Point"),
+ "23.0" : ("temp", "Heating Set Point"),
+ "24.0" : ("temp", "Heating 2nd Set Point"),
+ "25.0" : ("temp", "Heating Prop. Band"),
+ }
+
+ parsed = {}
+ parsed["temp"] = {}
+ for oidend, value in info:
+ quantity, sensor = oidtothing.get(oidend, (None, None))
+ if quantity == "temp":
+ if value and value != "0" and value != "-9999":
+ parsed[quantity][sensor] = float(value) / 10
+
+ return parsed
+
+
+def inventory_carel_sensors_temp(parsed):
+ for thing in parsed["temp"].keys():
+ yield thing, carel_temp_defaultlevels[thing]
+
+
+def check_carel_sensors_temp(item, params, parsed):
+ return check_temperature(parsed["temp"][item], params)
+
+
+check_info["carel_sensors"] = {
+ "parse_function" : carel_sensors_parse,
+ "inventory_function" : inventory_carel_sensors_temp,
+ "check_function" : check_carel_sensors_temp,
+ "service_description" : "Temperature %s",
+ "group" : "room_temperature",
+ "has_perfdata" : True,
+ "snmp_info" : ( ".1.3.6.1.4.1.9839.2.1", [
OID_END, "2" ] ),
+ "snmp_scan_function" : lambda oid: "pCO" in
oid(".1.3.6.1.2.1.1.1.0"),
+ "includes" : [ "temperature.include" ],
+}
diff --git a/pnp-templates/check_mk-carel_sensors.php
b/pnp-templates/check_mk-carel_sensors.php
new file mode 120000
index 0000000..8f2a365
--- /dev/null
+++ b/pnp-templates/check_mk-carel_sensors.php
@@ -0,0 +1 @@
+template-temperature.php
\ No newline at end of file
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 0a09b48..87f6fa9 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -348,6 +348,7 @@ perfometers["check_mk-rms200_temp"] =
perfometer_temperature
perfometers["check_mk-juniper_screenos_temp"] = perfometer_temperature
perfometers["check_mk-lnx_thermal"] = perfometer_temperature
perfometers["check_mk-climaveneta_temp"] = perfometer_temperature
+perfometers["check_mk-carel_sensors"] = perfometer_temperature
def perfometer_temperature_multi(row, check_command, perf_data):
display_value = -1