Module: check_mk
Branch: master
Commit: bf4e2b4f136827ad487e494873bf83528c0e9be3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bf4e2b4f136827…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Oct 31 15:16:56 2014 +0100
#1199 climaveneta_alarm: New check to display the alarm states on Climaveneta devcies
---
.werks/1199 | 9 ++++
ChangeLog | 1 +
checkman/climaveneta_alarm | 13 ++++++
checks/climaveneta_alarm | 107 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 130 insertions(+)
diff --git a/.werks/1199 b/.werks/1199
new file mode 100644
index 0000000..0c17eed
--- /dev/null
+++ b/.werks/1199
@@ -0,0 +1,9 @@
+Title: climaveneta_alarm: New check to display the alarm states on Climaveneta devcies
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1414764891
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 4e24e94..44abddb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 1197 climaveneta_temp: New check for temperature sensors on Climaveneta clima
devices
* 1167 citrix_license/esx_license: Can now be configured to always show OK as state
* 1198 climaveneta_fan: New check for fan speed on Climaveneta devices
+ * 1199 climaveneta_alarm: New check to display the alarm states on Climaveneta
devcies
* 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...
diff --git a/checkman/climaveneta_alarm b/checkman/climaveneta_alarm
new file mode 100644
index 0000000..9c31ef0
--- /dev/null
+++ b/checkman/climaveneta_alarm
@@ -0,0 +1,13 @@
+
+title: Climaveneta: Alarm States
+agents: snmp
+catalog: hw/environment/climaveneta
+license: GPL
+distribution: check_mk
+description:
+ This check displays all Alarm states on Climaveneta mc01_o4cv devices.
+ No configuration is necessary.
+
+inventory:
+ One service will be created.
+
diff --git a/checks/climaveneta_alarm b/checks/climaveneta_alarm
new file mode 100644
index 0000000..d39e4da
--- /dev/null
+++ b/checks/climaveneta_alarm
@@ -0,0 +1,107 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+climaveneta_alarms = {
+ #20 : "Global (general)",
+ 21 : "Maintenance Status",
+ 22 : "Password",
+ 23 : "High water 1erature",
+ 24 : "High water 2erature",
+ 25 : "Low room humidity",
+ 26 : "High room humidity",
+ 27 : "Low Roomerature",
+ 28 : "High roomerature",
+ 29 : "High air inleterature",
+ 30 : "High air outleterature",
+ 31 : "Room humid probe",
+ 32 : "Room probe",
+ 33 : "Inlet 1 probe",
+ 34 : "Inlet 2 probe",
+ 35 : "Inlet 3 probe",
+ 36 : "Inlet 4 probe",
+ 37 : "Outlet 1 probe",
+ 38 : "Outlet 2 probe",
+ 39 : "Outlet 3 probe",
+ 40 : "Outlet 4 probe",
+ 41 : "Water 1erature probe",
+ 42 : "Water 2erature probe",
+ 43 : "Door open",
+ 44 : "EEPROM",
+ 45 : "Fan 1 disconnected",
+ 46 : "Fan 2 disconnected",
+ 47 : "Fan 3 disconnected",
+ 48 : "Fan 4 disconnected",
+ 49 : "Dew point",
+ 50 : "Flooding",
+ 51 : "LAN",
+ 52 : "Dirty filter",
+ 53 : "Electronic thermostatic valve",
+ 54 : "Low pressure",
+ 55 : "High pressure",
+ 56 : "Air flow",
+ 57 : "Fire smoke",
+ 58 : "I/O expansion",
+ 59 : "Inverter",
+ 60 : "Envelop",
+ 61 : "Polygon inconsistent",
+ 62 : "Delta pressure for inverter compressor",
+ 63 : "Primary power supply",
+ 64 : "Energy managment",
+ 65 : "Low current humidif",
+ 66 : "No water humidif",
+ 67 : "High current humidif",
+ 68 : "Humidifier Board Offline",
+ 69 : "Life timer expired Reset/Clean cylinder",
+ 70 : "Humidifier Drain",
+ 71 : "Generic Humidifier",
+ 72 : "Electric heater",
+}
+
+
+def inventory_climaveneta_alarm(info):
+ return [(None,None)]
+
+
+def check_climaveneta_alarm(item, params, info):
+ hit = False
+ for oid_id, status in info:
+ alarm_id = int(oid_id.split('.')[0])
+ if alarm_id in climaveneta_alarms.keys():
+ if status != '0':
+ hit = True
+ yield 2, "Alarm: %s" % climaveneta_alarms[alarm_id]
+ if not hit:
+ yield 0, "No alarm state"
+
+
+check_info["climaveneta_alarm"] = {
+ "check_function" : check_climaveneta_alarm,
+ "inventory_function" : inventory_climaveneta_alarm,
+ "service_description" : "Alarm Status",
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.1.0")
== "pCO Gateway",
+ "snmp_info" : (".1.3.6.1.4.1.9839.2.1", [ OID_END, 1
] ),
+}
+