Module: check_mk
Branch: master
Commit: 0b7c477f95085fdc54888ca43538643e93ff58b4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0b7c477f95085f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Nov 6 11:15:52 2013 +0100
Fixed cisco_wlc: Behavier in case of missing device
---
checks/cisco_wlc | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/checks/cisco_wlc b/checks/cisco_wlc
index 77208a3..f370532 100644
--- a/checks/cisco_wlc
+++ b/checks/cisco_wlc
@@ -51,13 +51,13 @@ def check_cisco_wlc(item, params, info):
# Special treatment if this device is missing
if params:
- for name, mac, state, model in data:
- for ap_name, ap_state in params.get("ap_name", []):
- if name.startswith(ap_name):
- return ap_state, "Accesspoint not found (State set to %s by
rule)" % nagios_state_names[ap_state]
- for ap_model, ap_state in params.get("ap_model", []):
- if mode.startswith(ap_model):
- return ap_state, "Accesspoint not found (State set to %s by
rule)" % nagios_state_names[ap_state]
+ for ap_name, ap_state in params.get("ap_name", []):
+ if item.startswith(ap_name):
+ return ap_state, "Accesspoint 1 not found (State set to %s by
rule)" % nagios_state_names[ap_state]
+ # If the device is missin, with cannot know the model
+ #for ap_model, ap_state in params.get("ap_model", []):
+ # if mode.startswith(ap_model):
+ # return ap_state, "Accesspoint 2 not found (State set to %s by
rule)" % nagios_state_names[ap_state]
return 2, "Accesspoint not found"