Cleanup config.nodes_of
[check_mk.git] / checks / climaveneta_alarm
blob1fd6789e549e692bf724a97777e88526c6dbbfd8
1 #!/usr/bin/python
2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
9 # | |
10 # | Copyright Mathias Kettner 2013 mk@mathias-kettner.de |
11 # +------------------------------------------------------------------+
13 # This file is part of Check_MK.
14 # The official homepage is at http://mathias-kettner.de/check_mk.
16 # check_mk is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by
18 # the Free Software Foundation in version 2. check_mk is distributed
19 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
20 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
22 # tails. You should have received a copy of the GNU General Public
23 # License along with GNU Make; see the file COPYING. If not, write
24 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
25 # Boston, MA 02110-1301 USA.
27 climaveneta_alarms = {
28 #20 : "Global (general)",
29 21: "Maintenance Status",
30 22: "Password",
31 23: "High water 1erature",
32 24: "High water 2erature",
33 25: "Low room humidity",
34 26: "High room humidity",
35 27: "Low Roomerature",
36 28: "High roomerature",
37 29: "High air inleterature",
38 30: "High air outleterature",
39 31: "Room humid probe",
40 32: "Room probe",
41 33: "Inlet 1 probe",
42 34: "Inlet 2 probe",
43 35: "Inlet 3 probe",
44 36: "Inlet 4 probe",
45 37: "Outlet 1 probe",
46 38: "Outlet 2 probe",
47 39: "Outlet 3 probe",
48 40: "Outlet 4 probe",
49 41: "Water 1erature probe",
50 42: "Water 2erature probe",
51 43: "Door open",
52 44: "EEPROM",
53 45: "Fan 1 disconnected",
54 46: "Fan 2 disconnected",
55 47: "Fan 3 disconnected",
56 48: "Fan 4 disconnected",
57 49: "Dew point",
58 50: "Flooding",
59 51: "LAN",
60 52: "Dirty filter",
61 53: "Electronic thermostatic valve",
62 54: "Low pressure",
63 55: "High pressure",
64 56: "Air flow",
65 57: "Fire smoke",
66 58: "I/O expansion",
67 59: "Inverter",
68 60: "Envelop",
69 61: "Polygon inconsistent",
70 62: "Delta pressure for inverter compressor",
71 63: "Primary power supply",
72 64: "Energy managment",
73 65: "Low current humidif",
74 66: "No water humidif",
75 67: "High current humidif",
76 68: "Humidifier Board Offline",
77 69: "Life timer expired Reset/Clean cylinder",
78 70: "Humidifier Drain",
79 71: "Generic Humidifier",
80 72: "Electric heater",
84 def inventory_climaveneta_alarm(info):
85 return [(None, None)]
88 def check_climaveneta_alarm(item, params, info):
89 hit = False
90 for oid_id, status in info:
91 alarm_id = int(oid_id.split('.')[0])
92 if alarm_id in climaveneta_alarms.keys():
93 if status != '0':
94 hit = True
95 yield 2, "Alarm: %s" % climaveneta_alarms[alarm_id]
96 if not hit:
97 yield 0, "No alarm state"
100 check_info["climaveneta_alarm"] = {
101 "check_function": check_climaveneta_alarm,
102 "inventory_function": inventory_climaveneta_alarm,
103 "service_description": "Alarm Status",
104 "snmp_scan_function": lambda oid: oid(".1.3.6.1.2.1.1.1.0") == "pCO Gateway",
105 "snmp_info": (".1.3.6.1.4.1.9839.2.1", [OID_END, 1]),