2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
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 network_interface_scan_registry
.register(huawei_osn_scan_function
)
30 def convert_huawei_osn_if(line
):
37 line
[7], # ifHCInOctets 5
38 line
[1], # ifHCInUcastPkts 6
39 line
[2], # ifHCInMulticastPkts 7
40 line
[3], # ifHCInBroadcastPkts 8
42 line
[13], # ifInErrors 10
43 line
[8], # ifHCOutOctets 11
44 line
[4], # ifHCOutUcastPkts 12
45 line
[5], # ifHCOutMulticastPkts 13
46 line
[6], # ifHCOutBroadcastPkts 14
47 '0', # ifOutDiscards 15
48 line
[14], # ifOutErrors 16
51 '', # ifPhysAddress 19
55 def inventory_huawei_osn_if(info
):
60 def check_huawei_osn_if(item
, params
, info
):
64 payload
.append(convert_huawei_osn_if(line
))
65 return check_if_common(item
, params
, payload
)
68 check_info
['huawei_osn_if'] = {
69 'inventory_function': inventory_huawei_osn_if
,
70 'check_function': check_huawei_osn_if
,
71 'service_description': 'Interface %s',
73 '.1.3.6.1.4.1.2011.2.25.3.40.50.96.50.1',
75 "3.200", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmPara 0
76 "4.113", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmRXUNICAST 1
77 "4.114", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmRXMULCAST 2
78 "4.115", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmRXBRDCAST 3
79 "4.116", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmTXUNICAST 4
80 "4.117", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmTXMULCAST 5
81 "4.118", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmTXBRDCAST 6
82 "4.200", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmRXOCTETS 7
83 "4.199", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmTXOCTETS 8
84 "4.201", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmRXPKTS 9
85 "4.198", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmTXPKTS 10
86 "4.128", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmRXBBAD 11
87 "4.129", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmTXBBAD 12
88 "4.944", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmRXPBAD 13
89 "4.945", # OPTIX-GLOBAL-NGWDM-MIB::sdh_pathDataPmMonValue.pmTXPBAD 14
91 'snmp_scan_function': huawei_osn_scan_function
,
93 'includes': ['huawei_osn.include', 'if.include'],
95 'default_levels_variable': 'if_default_levels',