Skip to content

Commit

Permalink
Change Logic to detect Offline Access Points
Browse files Browse the repository at this point in the history
  • Loading branch information
JaRo5493 authored Nov 8, 2024
1 parent f663a57 commit 0d7e7fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmk/base/legacy_checks/huawei_wlc_aps.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ class StateTemplate(NamedTuple):
def parse_huawei_wlc_aps(string_table):
parsed = {}

# Filter Access Point Information from Offline Access Points
down_states = [key for key, value in ap_state_map.items() if value.value == 2]
string_table[0] = [line for line in string_table[0] if line[0] not in down_states]

aps_info1, aps_info2 = string_table

# Access-Points
Expand All @@ -56,10 +60,6 @@ def parse_huawei_wlc_aps(string_table):
# aps_info1 aps_info2
# [line] --> [2,4GHZ Info]
# --> [5GHz Info]

# Skip Access Points Reported by the Controller which have no Channel Information
if 2 * idx + 1 >= len(aps_info2):
continue

status, mem, cpu, temp, con_users = ap_info1
ap_id, radio_state_2GHz, ch_usage_2GHz, users_online_2GHz = aps_info2[2 * idx]
Expand Down

0 comments on commit 0d7e7fa

Please sign in to comment.