Refactored snapin server_time to new snapin API
[check_mk.git] / checks / enviromux
blob18cb37317a588e5c3ddfa48642537d067ceafe55
1 #!/usr/bin/python
2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
9 # | |
10 # | Copyright Mathias Kettner 2018 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.
29 # .--temperature---------------------------------------------------------.
30 # | _ _ |
31 # | | |_ ___ _ __ ___ _ __ ___ _ __ __ _| |_ _ _ _ __ ___ |
32 # | | __/ _ \ '_ ` _ \| '_ \ / _ \ '__/ _` | __| | | | '__/ _ \ |
33 # | | || __/ | | | | | |_) | __/ | | (_| | |_| |_| | | | __/ |
34 # | \__\___|_| |_| |_| .__/ \___|_| \__,_|\__|\__,_|_| \___| |
35 # | |_| |
36 # +----------------------------------------------------------------------+
37 # | |
38 # '----------------------------------------------------------------------'
40 check_info['enviromux'] = {
41 'parse_function' : parse_enviromux,
42 'inventory_function' : inventory_enviromux_temperature,
43 'check_function' : check_enviromux_temperature,
44 'service_description' : 'Sensor %s',
45 'snmp_info' : ('.1.3.6.1.4.1.3699.1.1.11.1.3.1.1', [
46 "1", # intSensorIndex
47 "2", # intSensorType
48 "3", # intSensorDescription
49 "4", # intSensorGroupNb
50 "5", # intSensorGroup
51 "6", # intSensorValue
52 "7", # intSensorUnit
53 "8", # intSensorUnitName
54 "9", # intSensorStatus
55 "10", # intSensorMinThreshold
56 "11", # intSensorMaxThreshold
57 # These appear to only return bogus values
58 #"12", # intSensorMinWarnThreshold
59 #"13", # intSensorMaxWarnThreshold
60 ]),
61 'includes' : [ "temperature.include" , "enviromux.include" ],
62 'has_perfdata' : True,
63 'snmp_scan_function' : enviromux_scan_function,
64 'group' : "temperature",
68 # .--Voltage-------------------------------------------------------------.
69 # | __ __ _ _ |
70 # | \ \ / /__ | | |_ __ _ __ _ ___ |
71 # | \ \ / / _ \| | __/ _` |/ _` |/ _ \ |
72 # | \ V / (_) | | || (_| | (_| | __/ |
73 # | \_/ \___/|_|\__\__,_|\__, |\___| |
74 # | |___/ |
75 # +----------------------------------------------------------------------+
76 # | |
77 # '----------------------------------------------------------------------'
80 check_info['enviromux.voltage'] = {
81 'inventory_function' : inventory_enviromux_voltage,
82 'check_function' : check_enviromux_voltage,
83 'service_description' : 'Sensor %s',
84 'has_perfdata' : True,
85 'group' : "voltage",
86 'default_levels_variable' : "enviromux_default_levels",
87 'includes' : [ "enviromux.include" ],
92 # .--Humidity------------------------------------------------------------.
93 # | _ _ _ _ _ _ |
94 # | | | | |_ _ _ __ ___ (_) __| (_) |_ _ _ |
95 # | | |_| | | | | '_ ` _ \| |/ _` | | __| | | | |
96 # | | _ | |_| | | | | | | | (_| | | |_| |_| | |
97 # | |_| |_|\__,_|_| |_| |_|_|\__,_|_|\__|\__, | |
98 # | |___/ |
99 # +----------------------------------------------------------------------+
100 # | |
101 # '----------------------------------------------------------------------'
103 check_info['enviromux.humidity'] = {
104 'inventory_function' : inventory_enviromux_humidity,
105 'check_function' : check_enviromux_humidity,
106 'service_description' : 'Sensor %s',
107 'has_perfdata' : True,
108 'includes' : [ "humidity.include" , "enviromux.include" ],
109 'group' : "humidity",