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

update project

parent cc9f1d55
No related branches found
No related tags found
No related merge requests found
......@@ -587,8 +587,8 @@ def check_cisco_wlc(item, params, section: Section) -> CheckResult:
def _node_not_found(item: str, params: Mapping[str, Any]) -> Result:
infotext = "Accesspoint not found"
for ap_name, ap_state in params.get("ap_name", []):
infotext = 'not found'
for ap_name, ap_state in params.get('ap_name', []):
if item.startswith(ap_name):
return Result(state=ap_state, summary=infotext)
return Result(state=State.CRIT, summary=infotext)
......@@ -596,10 +596,8 @@ def _node_not_found(item: str, params: Mapping[str, Any]) -> Result:
def _ap_info(node: Optional[str], wlc_status: Union[str, Ap]) -> Result:
wlc_status = str(wlc_status.ap_info.ap_operationstatus) if isinstance(wlc_status, Ap) else wlc_status
status, state_readable = _map_states.get(wlc_status, (State.UNKNOWN, f"unknown[{wlc_status}]"))
return Result(state=status,
summary="Accesspoint: %s%s" % (state_readable, (" (connected to %s)" % node) if node else ""),
)
status, state_readable = _map_states.get(wlc_status, (State.UNKNOWN, f"unknown [{wlc_status}]"))
return Result(state=status, summary=f'{state_readable}{f" (connected to {node})" if node else ""}',)
def cluster_check_cisco_wlc(
......
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