diff --git a/agent_based/cisco_wlc.py b/agent_based/cisco_wlc.py index 87133bb05d4baf3faf2530967d4c628a584b7316..1f6e4437500e584016fa67f40ff900cc0c54af85 100644 --- a/agent_based/cisco_wlc.py +++ b/agent_based/cisco_wlc.py @@ -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( diff --git a/cisco_wlc.mkp b/cisco_wlc.mkp index 45dd8e4c2cf646e68e9b0486f7db3808d26c9a72..c3e156e67d1e4b104ea4bcbca7ca977d9d4dd273 100644 Binary files a/cisco_wlc.mkp and b/cisco_wlc.mkp differ