Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / checks / didactum_can_sensors_analog
blob9ad927deeb450be65755820b469c48d808576d4c
1 #!/usr/bin/python
2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
9 # | |
10 # | Copyright Mathias Kettner 2016 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 # .1.3.6.1.4.1.46501.6.2.1.5.201007 alpha-bravo_doppelboden_frischluft --> DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogName.201007
28 # .1.3.6.1.4.1.46501.6.2.1.6.201007 normal --> DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogState.201007
29 # .1.3.6.1.4.1.46501.6.2.1.7.201007 14.9 --> DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogValue.201007
31 # .--temperature---------------------------------------------------------.
32 # | _ _ |
33 # | | |_ ___ _ __ ___ _ __ ___ _ __ __ _| |_ _ _ _ __ ___ |
34 # | | __/ _ \ '_ ` _ \| '_ \ / _ \ '__/ _` | __| | | | '__/ _ \ |
35 # | | || __/ | | | | | |_) | __/ | | (_| | |_| |_| | | | __/ |
36 # | \__\___|_| |_| |_| .__/ \___|_| \__,_|\__|\__,_|_| \___| |
37 # | |_| |
38 # +----------------------------------------------------------------------+
39 # | main check |
40 # '----------------------------------------------------------------------'
43 def inventory_didactum_can_sensors_analog_temp(parsed):
44 return inventory_didactum_sensors(parsed, "temperature")
47 check_info['didactum_can_sensors_analog'] = {
48 'parse_function': parse_didactum_sensors,
49 'inventory_function': inventory_didactum_can_sensors_analog_temp,
50 'check_function': check_didactum_sensors_temp,
51 'service_description': 'Temperature CAN %s',
52 'snmp_info': (
53 '.1.3.6.1.4.1.46501.6.2.1',
55 "4", # DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogType
56 "5", # DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogName
57 "6", # DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogState
58 "7", # DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogValue
59 "10", # DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogLowAlarm
60 "11", # DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogLowWarning
61 "12", # DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogHighWarning
62 "13", # DIDACTUM-SYSTEM-MIB::ctlCANSensorsAnalogHighAlarm
63 ]),
64 'snmp_scan_function': scan_didactum,
65 'has_perfdata': True,
66 'group': 'temperature',
67 'includes': ['temperature.include', 'didactum.include'],
71 # .--humidity------------------------------------------------------------.
72 # | _ _ _ _ _ |
73 # | | |__ _ _ _ __ ___ (_) __| (_) |_ _ _ |
74 # | | '_ \| | | | '_ ` _ \| |/ _` | | __| | | | |
75 # | | | | | |_| | | | | | | | (_| | | |_| |_| | |
76 # | |_| |_|\__,_|_| |_| |_|_|\__,_|_|\__|\__, | |
77 # | |___/ |
78 # '----------------------------------------------------------------------'
81 def inventory_didactum_can_sensors_analog_humid(parsed):
82 return inventory_didactum_sensors(parsed, "humidity")
85 check_info['didactum_can_sensors_analog.humidity'] = {
86 'inventory_function': inventory_didactum_can_sensors_analog_humid,
87 'check_function': check_didactum_sensors_humidity,
88 'service_description': 'Humidity CAN %s',
89 'has_perfdata': True,
90 'group': 'humidity',
91 'includes': ['humidity.include', 'didactum.include'],
95 # .--voltage-------------------------------------------------------------.
96 # | _ _ |
97 # | __ _____ | | |_ __ _ __ _ ___ |
98 # | \ \ / / _ \| | __/ _` |/ _` |/ _ \ |
99 # | \ V / (_) | | || (_| | (_| | __/ |
100 # | \_/ \___/|_|\__\__,_|\__, |\___| |
101 # | |___/ |
102 # '----------------------------------------------------------------------'
105 def inventory_didactum_can_sensors_analog_volt(parsed):
106 return inventory_didactum_sensors(parsed, "voltage")
109 check_info['didactum_can_sensors_analog.voltage'] = {
110 'inventory_function': inventory_didactum_can_sensors_analog_volt,
111 'check_function': check_didactum_sensors_voltage,
112 'service_description': 'Phase CAN %s',
113 'has_perfdata': True,
114 'group': 'el_inphase',
115 'includes': ['elphase.include', 'didactum.include'],