Module: check_mk
Branch: master
Commit: bceeb2e9baef9538a321d5cd285bdac7d9239571
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bceeb2e9baef95…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 16 08:35:16 2013 +0200
FIX: cisco_qos: Be compatible to newer IOS-XE versions (Thanks to Ken Smith)
---
ChangeLog | 1 +
checks/cisco_qos | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 3d1c2dd..c74d088 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -104,6 +104,7 @@
Checks & Agents:
* FIX: vsphere_agent: fix problems whith ! and \ in username or password
* FIX: check_mk_agent.aix: fix shebang: was python, must be ksh
+ * FIX: cisco_qos: Be compatible to newer IOS-XE versions (Thanks to Ken Smith)
1.2.2:
Core:
diff --git a/checks/cisco_qos b/checks/cisco_qos
index 61a64e7..97bb1f2 100644
--- a/checks/cisco_qos
+++ b/checks/cisco_qos
@@ -192,7 +192,12 @@ def check_cisco_qos(item, params, info):
# Gather information for this object
policy_if_id, policy_if_id2 = cisco_qos_get_ifs_by_class_id(config, class_id)[0]
- policy_id = config[policy_if_id+'.'+policy_if_id]
+ try:
+ policy_id = config[policy_if_id+'.'+policy_if_id]
+ except KeyError:
+ # Be compatible with newer IOS-XE releases where the last digit is pinned
+ # 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]