diff --git a/agent_based/cisco_cellular_lte.py b/agent_based/cisco_cellular_lte.py index f62f652914104fc518664f5ad074a82678d57bfa..449c72dee0ed45d5f8e86f27d13118bbf6118f5d 100644 --- a/agent_based/cisco_cellular_lte.py +++ b/agent_based/cisco_cellular_lte.py @@ -28,6 +28,7 @@ # IMEI -> International Mobile Equipment Identifier # ICCID -> Integrated Circuit Card ID # MSISDN -> Mobile Subscriber Integrated Services Digital Network Number +# FSN -> Factory Serial Number # RSSI -> Received Signal Strength Indicator # RSRP -> Reference Signal Received Power # RSRQ -> Reference Signal Received Quality diff --git a/agent_based/inv_cisco_cellular_lte.py b/agent_based/inv_cisco_cellular_lte.py index 13232256fdd88ea3bf48320c8adb3ab538f418c4..0da92db900a982af5d03da59d9e90f85713c41e1 100644 --- a/agent_based/inv_cisco_cellular_lte.py +++ b/agent_based/inv_cisco_cellular_lte.py @@ -343,7 +343,7 @@ def parse_inv_cisco_cellular_lte(string_table: List[StringByteTable]): apn=apn, ) - for oid_end, service_type, imsi, imei, iccid, msisdn, country, network, mcc, current_band in modem_table: + for oid_end, service_type, imsi, imei, iccid, msisdn, fsn, country, network, mcc, current_band in modem_table: if not country and mcc: country = _mobile_country_code.get(mcc, (None, None))[0] @@ -355,6 +355,7 @@ def parse_inv_cisco_cellular_lte(string_table: List[StringByteTable]): 'inventory_columns': { 'imsi': imsi if imsi else None, 'msisdn': msisdn if msisdn else None, + 'fsn': fsn if fsn else None, 'country': country if country else None, 'network': network if network else None, 'current_band': _cisco_gsm_band.get(current_band, f'Unknown {current_band}'), @@ -400,6 +401,7 @@ register.snmp_section( '3.1.1.2', # c3gImei '3.1.1.3', # c3gIccId '3.1.1.4', # c3gMsisdn + '3.1.1.5', # c3gFsn '3.2.1.8', # c3gGsmCountry '3.2.1.9', # c3gGsmNetwork '3.2.1.10', # c3gGsmMcc diff --git a/checkman/cisco_cellular_lte b/checkman/cisco_cellular_lte index 08ef898bcf6eb7a7979de60090d54f9719bbbc5b..b38a3a75cc1f083ca8d231a8fc9d2fea8fd634c3 100644 --- a/checkman/cisco_cellular_lte +++ b/checkman/cisco_cellular_lte @@ -1,45 +1,25 @@ -title: Dummy check man page - used as template for new check manuals -agents: linux, windows, aix, solaris, hpux, vms, freebsd, snmp -catalog: see modules/catalog.py for possible values +title: Cisco cellular LTE +agents: snmp +catalog: hw/network/cisco license: GPL -distribution: check_mk +distribution: https://thl-cmk.hopto.org description: - Describe here: (1) what the check actually does, (2) under which - circumstances it goes warning/critical, (3) which devices are supported - by the check, (4) if the check requires a separated plugin or - tool or separate configuration on the target host. + This check plugin will monitor 2G/3G/4G wireless modems and there associated connections. By default it will only + discover cellular modems with a SIM card/connectin attached. It was tested with the integrated modem of the + Cisco ISR1100 series routers and the with a NIM in a Cisco ISR4451. Each modem can have up to two connections at + the same time (over one SIM-card). The integrated modems and also newer NIM modules have dual SIM-card capabilities. + Dual SIM-Cards can be usesd in a redundancy failover manner. Only one SIM-Card will be active at any given time. -item: - Describe the syntax and meaning of the check's item here. Provide all - information one needs if coding a manual check with {checks +=} in {main.mk}. - Give an example. If the check uses {None} as sole item, - then leave out this section. -examples: - # Give examples for configuration in {main.mk} here. If the check has - # configuration variable, then give example for them here. + There is one WATO rule for the discovery and one for the service it self. You will find both rules under + the label "Cisco cellular LTE". - # set default levels to 40 and 60 percent: - foo_default_values = (40, 60) - # another configuration variable here: - inventory_foo_filter = [ "superfoo", "superfoo2" ] + In the discovery rule you can decide to discover cellular interfaces without attched SIM-card/connection also. -perfdata: - Describe precisely the number and meaning of performance variables - the check sends. If it outputs no performance data, then leave out this - section. +item: + By default the item is the name of the celluar interface used i.e: Ce0/2/0. inventory: - Describe how the inventory for the check works. Which items - will it find? Describe the influence of check specific - configuration parameters to the inventory. - -[parameters] -foofirst(int): describe the first parameter here (if parameters are grouped - as tuple) -fooother(string): describe another parameter here. + The discovery will find all Cisco devices identified by the sysObjectID and there cellular connections. -[configuration] -foo_default_levels(int, int): Describe global configuration variable of - foo here. Important: also tell the user how they are preset. diff --git a/cisco_cellular_lte.mkp b/cisco_cellular_lte.mkp index dd38d7eb17bf06563a878350a36dd4d4dd1d8f0c..8856b2e231159e3f9908b6007de6cf5a07aa4eeb 100644 Binary files a/cisco_cellular_lte.mkp and b/cisco_cellular_lte.mkp differ diff --git a/packages/cisco_cellular_lte b/packages/cisco_cellular_lte index e1783f5594d106f40814763e7687c3dec0ef523d..b197fed6af17032fa3d0b4ff9b95f46a4f43a7b9 100644 --- a/packages/cisco_cellular_lte +++ b/packages/cisco_cellular_lte @@ -4,11 +4,12 @@ 'download_url': 'https://thl-cmk.hopto.org', 'files': {'agent_based': ['cisco_cellular_lte.py', 'inv_cisco_cellular_lte.py'], + 'checkman': ['cisco_cellular_lte'], 'web': ['plugins/wato/cisco_cellular_lte.py', 'plugins/metrics/cisco_cellular_lte.py', 'plugins/views/inv_cisco_cellular_lte.py']}, 'name': 'cisco_cellular_lte', - 'num_files': 5, + 'num_files': 6, 'title': 'Cisco cellular LTE', 'version': '20220920.v0.0.1', 'version.min_required': '2.0.0', diff --git a/web/plugins/views/inv_cisco_cellular_lte.py b/web/plugins/views/inv_cisco_cellular_lte.py index 2d3604ae739648cbed3d1bb7f740cf81e2ef393a..61170d733184075959507442b1827f31008dcdfe 100644 --- a/web/plugins/views/inv_cisco_cellular_lte.py +++ b/web/plugins/views/inv_cisco_cellular_lte.py @@ -23,6 +23,7 @@ inventory_displayhints.update({ 'imei', 'iccid', 'imsi', + 'fsn', 'network', 'country', 'apn', @@ -38,6 +39,7 @@ inventory_displayhints.update({ 'short': _('MSISDN'), 'title': _('Mobile Subscriber Integrated Services Digital Network Number (MSISDN') }, + '.networking.cellular:*.fsn': {'short': _('FSN'), 'title': _('Factory serial Number (FSN)')}, '.networking.cellular:*.country': {'title': _('Country'), }, '.networking.cellular:*.network': {'title': _('Network'), }, '.networking.cellular:*.current_band': {'title': _('Current band'), },