2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
10 # | Copyright Mathias Kettner 2015 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 # .--temperature---------------------------------------------------------.
29 # | | |_ ___ _ __ ___ _ __ ___ _ __ __ _| |_ _ _ _ __ ___ |
30 # | | __/ _ \ '_ ` _ \| '_ \ / _ \ '__/ _` | __| | | | '__/ _ \ |
31 # | | || __/ | | | | | |_) | __/ | | (_| | |_| |_| | | | __/ |
32 # | \__\___|_| |_| |_| .__/ \___|_| \__,_|\__|\__,_|_| \___| |
34 # +----------------------------------------------------------------------+
36 # '----------------------------------------------------------------------'
38 check_info
['raritan_px2_sensors'] = {
39 'parse_function': parse_raritan_sensors
,
40 'inventory_function': lambda parsed
: inventory_raritan_sensors_temp(parsed
, 'temp'),
41 'check_function': check_raritan_sensors_temp
,
42 'service_description': 'Temperature %s',
45 ".1.3.6.1.4.1.13742.6",
47 "5.5.3.1.2.1", # measurementsExternalSensorIsAvailable -> True/False (1/0)
49 "3.6.3.1.5.1", # externalSensorDescription
50 "3.6.3.1.2.1", # externalSensorType
51 "5.5.3.1.3.1", # measurementsExternalSensorState
52 "3.6.3.1.16.1", # externalSensorUnits
53 "3.6.3.1.17.1", # externalSensorDecimalDigits -> for scaling the values
54 "5.5.3.1.4.1", # measurementsExternalSensorValue
55 "3.6.3.1.31.1", # externalSensorLowerCriticalThreshold
56 "3.6.3.1.32.1", # externalSensorLowerWarningThreshold
57 "3.6.3.1.33.1", # externalSensorUpperCriticalThreshold
58 "3.6.3.1.34.1", # externalSensorUpperWarningThreshold
60 'snmp_scan_function': lambda oid
: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.13742.6",
61 'group': "temperature",
62 'includes': ["raritan.include", "temperature.include"],
66 # .--airflow-------------------------------------------------------------.
68 # | __ _(_)_ __ / _| | _____ __ |
69 # | / _` | | '__| |_| |/ _ \ \ /\ / / |
70 # | | (_| | | | | _| | (_) \ V V / |
71 # | \__,_|_|_| |_| |_|\___/ \_/\_/ |
73 # +----------------------------------------------------------------------+
75 check_info
['raritan_px2_sensors.airflow'] = {
76 'inventory_function': lambda parsed
: inventory_raritan_sensors(parsed
, 'airflow'),
77 'check_function': check_raritan_sensors
,
78 'service_description': 'Air flow %s',
83 # .--humidity------------------------------------------------------------.
85 # | | |__ _ _ _ __ ___ (_) __| (_) |_ _ _ |
86 # | | '_ \| | | | '_ ` _ \| |/ _` | | __| | | | |
87 # | | | | | |_| | | | | | | | (_| | | |_| |_| | |
88 # | |_| |_|\__,_|_| |_| |_|_|\__,_|_|\__|\__, | |
90 # +----------------------------------------------------------------------+
92 check_info
['raritan_px2_sensors.humidity'] = {
93 'inventory_function': lambda parsed
: inventory_raritan_sensors(parsed
, 'humidity'),
94 'check_function': check_raritan_sensors
,
95 'service_description': 'Humidity %s',
100 # .--pressure------------------------------------------------------------.
102 # | _ __ _ __ ___ ___ ___ _ _ _ __ ___ |
103 # | | '_ \| '__/ _ \/ __/ __| | | | '__/ _ \ |
104 # | | |_) | | | __/\__ \__ \ |_| | | | __/ |
105 # | | .__/|_| \___||___/___/\__,_|_| \___| |
107 # +----------------------------------------------------------------------+
109 check_info
['raritan_px2_sensors.pressure'] = {
110 'inventory_function': lambda parsed
: inventory_raritan_sensors(parsed
, 'pressure'),
111 'check_function': check_raritan_sensors
,
112 'service_description': 'Pressure %s',
113 'has_perfdata': True,