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

update project

parent cbf3097a
No related branches found
No related tags found
No related merge requests found
......@@ -37,11 +37,14 @@ from cmk.base.plugins.agent_based.agent_based_api.v1.type_defs import (
def _render_ip_address(bytestring):
bytestring_clean = bytestring.replace('"', '').replace('|4|', '').replace('.', ' ').strip().split(' ')
try:
return '.'.join(['%s' % int(m, 16) for m in bytestring_clean])
except ValueError:
return bytestring
if len(bytestring) == 4:
return '.'.join(['%s' % ord(m) for m in bytestring])
else:
bytestring_clean = bytestring.replace('"', '').replace('|4|', '').replace('.', ' ').strip().split(' ')
try:
return '.'.join(['%s' % int(m, 16) for m in bytestring_clean])
except ValueError:
return bytestring
_cdp_duplex = {
......@@ -94,6 +97,7 @@ def parse_cisco_wlc_ap_cdp_cache(string_table: StringTable):
neighbours = []
for deviceindex, apname, apaddresstype, apaddress, neighname, neighaddresstype, neighaddress, neighinterface, \
platform, duplex, speed in string_table:
if int(apaddresstype) == 1:
apaddress = _render_ip_address(apaddress)
......
No preview for this file type
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