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

update project

parent 9a449eba
No related branches found
No related tags found
No related merge requests found
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
# fixed _render_mac_address/_render_ip_address, code cleanup, removed WIPS check # fixed _render_mac_address/_render_ip_address, code cleanup, removed WIPS check
# added lwap_uptime/time taken to join. changed perfdata to 1/s # added lwap_uptime/time taken to join. changed perfdata to 1/s
# 2021-07-29: fix missing data from discovery (inv_ap_info) # 2021-07-29: fix missing data from discovery (inv_ap_info)
# 2022-03-07: fixed handling of missing AP (THX to andreas[dot]doehler[at]gmail[dot]com # 2022-03-07: fixed handling of missing AP (THX to andreas[dot]doehler[at]gmail[dot]com)
# # 2022-04-01: added RADIO MAC address
from time import time from time import time
from dataclasses import dataclass from dataclasses import dataclass
...@@ -94,6 +94,7 @@ class ApInfo: ...@@ -94,6 +94,7 @@ class ApInfo:
ap_serialnumber: str ap_serialnumber: str
ap_ipaddress: str ap_ipaddress: str
ap_ethernetmacaddress: str ap_ethernetmacaddress: str
ap_radio_mac: str
ap_operationstatus: Optional[int] = None ap_operationstatus: Optional[int] = None
...@@ -270,8 +271,9 @@ def parse_cisco_wlc(string_table: List[StringTable]) -> Optional[Dict[str, Ap]]: ...@@ -270,8 +271,9 @@ def parse_cisco_wlc(string_table: List[StringTable]) -> Optional[Dict[str, Ap]]:
parsed = {} parsed = {}
for ap in bsnap: for ap in bsnap:
ap_oid_end, bsnap_name, ap_location, ap_operationstatus, ap_model, ap_serialnumber, \ ap_oid_end, ap_dot3_mac_address, bsnap_name, ap_location, ap_operationstatus, ap_model, ap_serialnumber, \
ap_ipaddress, ap_ethernetmacaddress = ap ap_ipaddress, ap_ethernetmacaddress = ap
ap_info = ApInfo( ap_info = ApInfo(
ap_location=ap_location, ap_location=ap_location,
ap_operationstatus=int(ap_operationstatus) if ap_operationstatus.isdigit else None, ap_operationstatus=int(ap_operationstatus) if ap_operationstatus.isdigit else None,
...@@ -279,6 +281,7 @@ def parse_cisco_wlc(string_table: List[StringTable]) -> Optional[Dict[str, Ap]]: ...@@ -279,6 +281,7 @@ def parse_cisco_wlc(string_table: List[StringTable]) -> Optional[Dict[str, Ap]]:
ap_serialnumber=ap_serialnumber, ap_serialnumber=ap_serialnumber,
ap_ipaddress=ap_ipaddress, ap_ipaddress=ap_ipaddress,
ap_ethernetmacaddress=_render_mac_address(ap_ethernetmacaddress), ap_ethernetmacaddress=_render_mac_address(ap_ethernetmacaddress),
ap_radio_mac=_render_mac_address(ap_dot3_mac_address),
) )
parsed.update({ parsed.update({
...@@ -294,7 +297,7 @@ def parse_cisco_wlc(string_table: List[StringTable]) -> Optional[Dict[str, Ap]]: ...@@ -294,7 +297,7 @@ def parse_cisco_wlc(string_table: List[StringTable]) -> Optional[Dict[str, Ap]]:
########################################################################### ###########################################################################
# #
# INVENTORY function # DISCOVERY function
# #
########################################################################### ###########################################################################
...@@ -417,7 +420,8 @@ def check_cisco_wlc(item, params, section: Dict[str, Ap]) -> CheckResult: ...@@ -417,7 +420,8 @@ def check_cisco_wlc(item, params, section: Dict[str, Ap]) -> CheckResult:
yield Result(state=State.OK, notice=f'\nBase data:') yield Result(state=State.OK, notice=f'\nBase data:')
yield Result(state=State.OK, notice=f' - IP address: {ap_info.ap_ipaddress}') yield Result(state=State.OK, notice=f' - IP address: {ap_info.ap_ipaddress}')
yield Result(state=State.OK, notice=f' - MAC address: {ap_info.ap_ethernetmacaddress}') yield Result(state=State.OK, notice=f' - Ethernet MAC address: {ap_info.ap_ethernetmacaddress}')
yield Result(state=State.OK, notice=f' - Radio MAC address: {ap_info.ap_radio_mac}')
yield Result(state=State.OK, notice=f' - Model: {ap_info.ap_model}') yield Result(state=State.OK, notice=f' - Model: {ap_info.ap_model}')
yield Result(state=State.OK, notice=f' - S/N: {ap_info.ap_serialnumber}') yield Result(state=State.OK, notice=f' - S/N: {ap_info.ap_serialnumber}')
yield Result(state=State.OK, notice=f' - Location: {ap_info.ap_location}') yield Result(state=State.OK, notice=f' - Location: {ap_info.ap_location}')
...@@ -574,6 +578,7 @@ register.snmp_section( ...@@ -574,6 +578,7 @@ register.snmp_section(
base='.1.3.6.1.4.1.14179.2.2.1.1', # AIRESPACE-WIRELESS-MIB::bsnAPEntry base='.1.3.6.1.4.1.14179.2.2.1.1', # AIRESPACE-WIRELESS-MIB::bsnAPEntry
oids=[ oids=[
OIDEnd(), OIDEnd(),
'1', # bsnAPDot3MacAddress
'3', # 1 bsnAPName '3', # 1 bsnAPName
'4', # 2 bsnAPLocation '4', # 2 bsnAPLocation
'6', # 3 bsnAPOperationStatus '6', # 3 bsnAPOperationStatus
......
No preview for this file type
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
'name': 'cisco_wlc', 'name': 'cisco_wlc',
'num_files': 3, 'num_files': 3,
'title': 'monitor Cisco WLC APs', 'title': 'monitor Cisco WLC APs',
'version': '20220307.v0.5c', 'version': '20220401.v0.6',
'version.min_required': '2.0.0', 'version.min_required': '2.0.0',
'version.packaged': '2021.09.20', 'version.packaged': '2021.09.20',
'version.usable_until': None} '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