Module: check_mk
Branch: master
Commit: 65eaa188ccf2fd897a495d57f7fe46adf9ef43d5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=65eaa188ccf2fd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 4 11:43:31 2013 +0200
FIX: cisco_qos: Catch policies without post/drop byte information
---
ChangeLog | 1 +
checks/cisco_qos | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2851764..fd1e1f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -75,6 +75,7 @@
* FIX: hr_mem: handle virtual memory correct on some devices
* FIX: apache_status agent plugin: now also works, if prog name contains slashes
* FIX: check_dns: parameter -A does not get an additional string
+ * FIX: cisco_qos: Catch policies without post/drop byte information
Notifications:
* notify.py: Matching service level: Use the hosts service level if a
diff --git a/checks/cisco_qos b/checks/cisco_qos
index b12009c..bc26568 100644
--- a/checks/cisco_qos
+++ b/checks/cisco_qos
@@ -199,8 +199,8 @@ def check_cisco_qos(item, params, info):
# to "1" instead of the plicy_if_id
policy_id = config[policy_if_id+'.1']
policy_name = policies[policy_id]
- post_b = post_bytes[policy_if_id+'.'+policy_if_id2]
- drop_b = drop_bytes[policy_if_id+'.'+policy_if_id2]
+ post_b = post_bytes.get(policy_if_id+'.'+policy_if_id2, 0)
+ drop_b = drop_bytes.get(policy_if_id+'.'+policy_if_id2, 0)
speed = saveint(if_speeds[if_id])
speed_found = False