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 eb0d1d19 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent 2812888e
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
#
# 2022-11-08: fixed crash in parse function on empty inv_data
# 2022-11-09: removed ' ()' from firmware version
# 2022-11-12: added support for CM81xx series (sysObjectID = .1.3.6.1.4.1.25049.1.101)
#
# sample string_table
# [
......@@ -149,6 +150,57 @@ register.snmp_section(
detect=startswith('.1.3.6.1.2.1.1.2.0', '.1.3.6.1.4.1.25049'), # sysObjectID == opengear
)
def parse_inv_opengear_base_om(string_table: StringTable) -> Optional[List]:
try:
host_name, serial_number, firmware_version, vendor, model_name, number_of_lines = string_table[0]
except IndexError:
return
section = []
invPath = ['hardware', 'system']
for key, value in [
('serial', serial_number),
('manufacturer', vendor),
('model', model_name),
('host_name', host_name),
]:
if not value == '':
section.append((invPath, key, value))
invPath = ['software', 'firmware']
for key, value in [
('vendor', 'opengear'),
('version', firmware_version.rstrip(' ()')),
]:
if not value == '':
section.append((invPath, key, value))
return section
register.snmp_section(
name='inv_opengear_base_om',
parse_function=parse_inv_opengear_base_om,
parsed_section_name='inv_opengear_base',
fetch=SNMPTree(
base='.1.3.6.1.4.1.25049.10.19', # OG-OMTELEM-MIB::ogOmTelem
oids=[
'1.1', # ogOmSystemHostName
'1.2', # ogOmSystemSerialNumber
'1.3', # ogOmSystemFirmwareVersion
'1.4', # ogOmSystemVendor
'1.5', # ogOmSystemModel
'2.1', # ogOmSerialPortCount
]
),
detect=startswith('.1.3.6.1.2.1.1.2.0', '.1.3.6.1.4.1.25049.1.101'), # sysObjectID == OG-PRODUCTS-MIB::ogOperationsManager
)
register.inventory_plugin(
name='inv_opengear_base',
inventory_function=inventory_opengear_base,
......
No preview for this file type
......@@ -8,13 +8,14 @@
'- IM4216\n'
'- CM7116\n'
'- CM7132\n'
'- CM7148\n',
'- CM7148\n'
'- CM81XX\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'agent_based': ['inv_opengear_base.py']},
'name': 'inv_opengear_base',
'num_files': 1,
'title': 'opengear base inventory',
'version': '20221109.v.0.01b',
'version': '20221112.v.0.02',
'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