2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
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.
28 def parse_alcatel_aos7_temp(info
):
31 most_recent_values
= info
[-1]
33 board_not_connected_value
= 0
34 boards
= ("CPMA", "CFMA", "CPMB", "CFMB", "CFMC", "CFMD", "FTA", "FTB", "NI1", "NI2", "NI3",
35 "NI4", "NI5", "NI6", "NI7", "NI8")
36 for index
, board
in enumerate(boards
):
38 temperature
= int(most_recent_values
[index
])
41 if temperature
!= board_not_connected_value
:
42 parsed
[board
] = temperature
47 def check_alcatel_aos7_temp(item
, params
, data
):
48 yield check_temperature(data
, params
, "alcatel_temp_aos7%s" % item
)
51 check_info
["alcatel_temp_aos7"] = {
52 "parse_function": parse_alcatel_aos7_temp
,
53 "inventory_function": discover(),
54 "check_function": check_alcatel_aos7_temp
,
55 "service_description": "Temperature Board %s",
56 "group": "temperature",
57 "default_levels_variable": "alcatel_temp",
59 "snmp_scan_function": alcatel_new_networking_products_scan_function
,
61 '.1.3.6.1.4.1.6486.801.1.1.1.3.1.1.3.1', # MIB object "chasChassisEntry"
63 8, # MIB object "chasCPMAHardwareBoardTemp"
64 9, # MIB object "chasCFMAHardwareBoardTemp"
65 10, # MIB object "chasCPMBHardwareBoardTemp"
66 11, # MIB object "chasCFMBHardwareBoardTemp"
67 12, # MIB object "chasCFMCHardwareBoardTemp"
68 13, # MIB object "chasCFMDHardwareBoardTemp"
69 14, # MIB object "chasFTAHardwareBoardTemp"
70 15, # MIB object "chasFTBHardwareBoardTemp"
71 16, # MIB object "chasNI1HardwareBoardTemp"
72 17, # MIB object "chasNI2HardwareBoardTemp"
73 18, # MIB object "chasNI3HardwareBoardTemp"
74 19, # MIB object "chasNI4HardwareBoardTemp"
75 20, # MIB object "chasNI5HardwareBoardTemp"
76 21, # MIB object "chasNI6HardwareBoardTemp"
77 22, # MIB object "chasNI7HardwareBoardTemp"
78 23, # MIB object "chasNI8HardwareBoardTemp"
80 "includes": ["alcatel.include", "temperature.include"],