Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit e18882fe authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent e4b3da82
No related branches found
No related tags found
No related merge requests found
......@@ -5,10 +5,14 @@
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2021-12-25
# Date : 2022-06-28
# file : inv_opengear_base
#
# opengear base inventory
#
# 2022-11-08: fixed crash in parse function empty inv_data
#
#
# sample string_table
# [
# [
......@@ -36,10 +40,39 @@ from cmk.base.plugins.agent_based.agent_based_api.v1 import (
startswith,
)
# from the OG-PRODUCTS-MIB, LAST-UPDATED "202005200000Z"
#
# ogCM4001 OBJECT IDENTIFIER ::= { ogProducts 1 }
# ogCM4002 OBJECT IDENTIFIER ::= { ogProducts 2 }
# ogCM4008 OBJECT IDENTIFIER ::= { ogProducts 3 }
# ogCM41xx OBJECT IDENTIFIER ::= { ogProducts 10 }
# ogCM71xx OBJECT IDENTIFIER ::= { ogProducts 11 }
# ogCM7196 OBJECT IDENTIFIER ::= { ogProducts 12 }
# ogSD4001 OBJECT IDENTIFIER ::= { ogProducts 20 }
# ogSD4002 OBJECT IDENTIFIER ::= { ogProducts 21 }
# ogSD4008 OBJECT IDENTIFIER ::= { ogProducts 22 }
# ogSD4001DW OBJECT IDENTIFIER ::= { ogProducts 23 }
# ogSD4002DX OBJECT IDENTIFIER ::= { ogProducts 24 }
# ogCD OBJECT IDENTIFIER ::= { ogProducts 30 }
# ogCMx86 OBJECT IDENTIFIER ::= { ogProducts 31 }
# ogCMS61xx OBJECT IDENTIFIER ::= { ogProducts 40 }
# ogLighthouse OBJECT IDENTIFIER ::= { ogProducts 41 }
# ogLighthouse5 OBJECT IDENTIFIER ::= { ogProducts 42 }
# ogIM4004 OBJECT IDENTIFIER ::= { ogProducts 50 }
# ogIM42xx OBJECT IDENTIFIER ::= { ogProducts 60 }
# ogIM72xx OBJECT IDENTIFIER ::= { ogProducts 61 }
# ogKCS61xx OBJECT IDENTIFIER ::= { ogProducts 70 }
# ogACM500x OBJECT IDENTIFIER ::= { ogProducts 80 }
# ogACM550x OBJECT IDENTIFIER ::= { ogProducts 81 }
# ogACM700x OBJECT IDENTIFIER ::= { ogProducts 90 }
# ogACM70045 OBJECT IDENTIFIER ::= { ogProducts 91 }
# ogOperationsManager OBJECT IDENTIFIER ::= { ogProducts 101 }
#
_opengear_models = {
('.1.3.6.1.4.1.25049.1.11', 18): 'CM7116', # 16 serial + 2 usb lines
('.1.3.6.1.4.1.25049.1.11', 34): 'CM7132', # 32 serial + 2 usb lines
('.1.3.6.1.4.1.25049.1.11', 48): 'CM7148', # 48 serial + 2 usb lines
('.1.3.6.1.4.1.25049.1.11', 50): 'CM7148', # 48 serial + 2 usb lines
('.1.3.6.1.4.1.25049.1.60', 16): 'IM4216', # 16 serial lines
}
......@@ -47,7 +80,10 @@ _opengear_models = {
def parse_inv_opengear_base(string_table: List[StringTable]) -> Optional[List]:
inv_data, ogSerialPortCTS, sysObjectID = string_table
firmware_version, serial_number = inv_data[0]
try:
firmware_version, serial_number = inv_data[0]
except IndexError:
return
if serial_number == 'N/A':
serial_number = ''
......@@ -98,7 +134,7 @@ register.snmp_section(
]
),
SNMPTree(
base='.1.3.6.1.4.1.25049.17.2.1', # OG-STATUSv2-MIB
base='.1.3.6.1.4.1.25049.17.2.1', # OG-STATUSv2-MIB:orgSerialÜprtEntry
oids=[
'19', # ogSerialPortCTS. ogSerialPortIndex don't exist so we use CTS to get the number of lines
]
......
No preview for this file type
......@@ -14,7 +14,7 @@
'name': 'inv_opengear_base',
'num_files': 1,
'title': 'opengear base inventory',
'version': '20220628.v.0.01',
'version': '20221108.v.0.01a',
'version.min_required': '2.0.0',
'version.packaged': '2021.09.20',
'version.usable_until': None}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment