Module: check_mk
Branch: master
Commit: 88068373778204cae123fab8ac6e72ff49f2eca6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=88068373778204…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Tue Jul 31 13:40:20 2012 +0200
New check: CAREL Uniflair airconditioning
---
ChangeLog | 1 +
checkman/carel_uniflair_cooling | 37 ++++++++++++++++
checks/carel_uniflair_cooling | 82 ++++++++++++++++++++++++++++++++++++
web/plugins/perfometer/check_mk.py | 8 ++++
4 files changed, 128 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6b80b58..ea692af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* FIX: windows agent: try to fix crash in event log handling
* FreeBSD Agent: Added swapinfo call to mem section to make mem check work again
* windows_multipath: Added the missing check for multipath.vbs (Please test)
+ * carel_uniflair_cooling: new check for monitoring datacenter air conditioning by
"CAREL"
WATO:
* Added permission to control the "clone host" feature in WATO
diff --git a/checkman/carel_uniflair_cooling b/checkman/carel_uniflair_cooling
new file mode 100644
index 0000000..50c3453
--- /dev/null
+++ b/checkman/carel_uniflair_cooling
@@ -0,0 +1,37 @@
+title: Check Carel Uniflair Cooling devices
+agents: snmp
+author: Andreas Boesl <ab(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check monitors parameters of datacenter cooling devices
+ using a SNMP interface made by CAREL, which is i.e. used in the
+ Uniflair series of ACs.
+
+ The check only monitors part of the data supported by the MIB
+ since the MIB does not give info about potential values in
+ some OIDs.
+
+ The check queries and goes to {CRIT} for any of these values:
+ the global status (this should catch any error)
+ water loss (one of multiple water-related values),
+ emergency operation mode (this is triggered following a
+ failure, running at maximum performance)
+
+ The check also queries the air humidity level, but currently
+ does not allow setting a level on this.
+
+
+item:
+ This check generates no item.
+
+perfdata:
+ None
+
+inventory:
+ The check first looks for a cooling device vendor (this
+ is where it needs to be extended to cover other Carel devices),
+ then for the SNMP management device, and then for the MIB region
+ for cooling devices.
+ If all of these are found, the inventory creates a single service.
+
diff --git a/checks/carel_uniflair_cooling b/checks/carel_uniflair_cooling
new file mode 100755
index 0000000..de60c4c
--- /dev/null
+++ b/checks/carel_uniflair_cooling
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2012 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.
+
+
+# snmp_scan_function
+#.1.3.6.1.2.1.1.4.0 = STRING: x.name(a)green-cooling.de < green-cooling match
+#.1.3.6.1.2.1.1.5.0 = STRING: pCOWeb < pcoweb match
+#.1.3.6.1.4.1.9839.1 < exists
+
+# snmp_info
+#.1.3.6.1.4.1.9839.2.1.1.31.0 = INTEGER: 0 < Waterloss
+#.1.3.6.1.4.1.9839.2.1.1.51.0 = INTEGER: 1 < Global
+#.1.3.6.1.4.1.9839.2.1.1.67.0 = INTEGER: 0 < Unit in Emergeny operation
+#.1.3.6.1.4.1.9839.2.1.2.6.0 = INTEGER: 246 < Humidifier: Relative Humidity
+
+
+def inventory_carel_uniflair_cooling(info):
+ return [ (None, None) ]
+
+
+def check_carel_uniflair_cooling(item, _no_params, info):
+ waterloss, global_status, ermergency_op, humidity = info[0]
+
+ err_waterloss = waterloss != "0"
+ err_global_status = global_status != "1"
+ err_emergency_op = ermergency_op != "0"
+ humidity = float(humidity)/10
+
+ output = ""
+ output = output + ( "Global Status:%s" % (err_global_status and
"(!!)Error, " or "OK, " ))
+ output = output + ( "Emergency Operation:%s" % (err_emergency_op and
"(!!)Active, " or "Inactive, "))
+ output = output + ( "Humidifier:%s" % (err_waterloss and "(!!)Water
Loss, " or "No Water Loss, " ))
+ output = output + "Humidity: %3.1f%%" % humidity
+
+
+ perfdata = [ ("humidity", humidity) ]
+ if err_waterloss or err_global_status or err_emergency_op:
+ return (2, "CRITICAL - %s" % output, perfdata)
+ else:
+ return (0, "OK - %s" % output, perfdata)
+
+ return (3, "UNKNOWN - Unknown data from agent", perfdata)
+
+
+check_info["carel_uniflair_cooling"] = {
+ "check_function" : check_carel_uniflair_cooling,
+ "inventory_function" : inventory_carel_uniflair_cooling,
+ "service_description" : "Carel uniflair cooling",
+ "has_perfdata" : True,
+ "snmp_scan_function" : lambda oid: "green-cooling" in
oid(".1.3.6.1.2.1.1.4.0").lower() \
+ and "pcoweb" in
oid(".1.3.6.1.2.1.1.5.0").lower() \
+ and oid(".1.3.6.1.4.1.9839.1.2.0"),
+ "snmp_info" : (".1.3.6.1.4.1.9839.2.1", [
+ "1.31.0", # Waterloss
+ "1.51.0", # Global
+ "1.67.0", # Unit in Emergency operation
+ "2.6.0", # Relative Humidity
+ ]),
+}
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 43c719e..9f4cfdf 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -582,3 +582,11 @@ def perfometer_cmc_lcp(row, check_command, perf_data):
return "%.1f %s" % (val,unit), perfometer_logarithmic(val, 4, 2, color)
perfometers["check_mk-cmc_lcp"] = perfometer_cmc_lcp
+
+
+def perfometer_carel_uniflair_cooling(row, check_command, perf_data):
+ humidity = float(perf_data[0][1])
+ return "%3.1f%%" % humidity, perfometer_linear(humidity, '#6f2')
+
+perfometers['check_mk-carel_uniflair_cooling'] =
perfometer_carel_uniflair_cooling
+