Cleanup config.nodes_of
[check_mk.git] / checks / liebert_chilled_water
blob54b63dedb4fa08f7a37f03cc4d148ab63b65d115
1 #!/usr/bin/python
2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
9 # | |
10 # | Copyright Mathias Kettner 2017 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 # example output
28 # .1.3.6.1.4.1.476.1.42.3.9.20.1.10.1.2.100.4626 Supply Chilled Water Over Temp
29 # .1.3.6.1.4.1.476.1.42.3.9.20.1.20.1.2.100.4626 Inactive Event
30 # .1.3.6.1.4.1.476.1.42.3.9.20.1.10.1.2.100.4703 Chilled Water Control Valve Failure
31 # .1.3.6.1.4.1.476.1.42.3.9.20.1.20.1.2.100.4703 Inactive Event
32 # .1.3.6.1.4.1.476.1.42.3.9.20.1.10.1.2.100.4980 Supply Chilled Water Loss of Flow
33 # .1.3.6.1.4.1.476.1.42.3.9.20.1.20.1.2.100.4980 Inactive Event
36 def inventory_liebert_chilled_water(parsed):
37 for key in parsed.iterkeys():
38 if key:
39 yield (key, {})
42 def check_liebert_chilled_water(item, params, parsed):
43 for key, value in parsed.iteritems():
44 if item == key and value.lower() == "inactive event":
45 yield 0, "Normal"
46 elif item == key:
47 yield 2, "%s" % value
50 check_info['liebert_chilled_water'] = {
51 'parse_function': parse_liebert_without_unit,
52 'inventory_function': inventory_liebert_chilled_water,
53 'check_function': check_liebert_chilled_water,
54 'service_description': '%s',
55 'snmp_info': (
56 '.1.3.6.1.4.1.476.1.42.3.9.20.1',
58 '10.1.2.100.4626', #LIEBERT-GP-FLExible-MIB: lgpFlexibleEntryDataLabel
59 '20.1.2.100.4626', #LIEBERT-GP-FLExible-MIB: lgpFlexibleEntryValue
60 '10.1.2.100.4703', #LIEBERT-GP-FLExible-MIB: lgpFlexibleEntryDataLabel
61 '20.1.2.100.4703', #LIEBERT-GP-FLExible-MIB: lgpFlexibleEntryValue
62 '10.1.2.100.4980', #LIEBERT-GP-FLExible-MIB: lgpFlexibleEntryDataLabel
63 '20.1.2.100.4980', #LIEBERT-GP-FLExible-MIB: lgpFlexibleEntryValue
64 ]),
65 'snmp_scan_function': scan_liebert,
66 'includes': ['liebert.include'],