Module: check_mk
Branch: master
Commit: 8684afb55ba7f52fb3b7df174ebf07e184f7a9b3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8684afb55ba7f5…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Feb 22 11:00:54 2017 +0100
4349 FIX cisco_qos: Fix crashing check for some cases where the QoS class cannot be found
The check will still return Unknown, but no longer crash.
Change-Id: I08562f9f0076458e6e87765e83e9b62dcdc81650
---
.werks/4349 | 10 ++++++++++
ChangeLog | 1 +
checks/cisco_qos | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4349 b/.werks/4349
new file mode 100644
index 0000000..28065d4
--- /dev/null
+++ b/.werks/4349
@@ -0,0 +1,10 @@
+Title: cisco_qos: Fix crashing check for some cases where the QoS class cannot be found
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.5.0i1
+Date: 1487757577
+
+The check will still return Unknown, but no longer crash.
diff --git a/ChangeLog b/ChangeLog
index 263d440..2e7f321 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
* 4375 FIX: check_sql: Fixed reporting configuration issues to monitoring core...
* 4406 FIX: Fixed some invalid keyword arguments in check_info declarations...
* 4408 FIX: checkpoint_temp, checkpoint_fan, checkpoint_voltage: fixed status and value handling
+ * 4349 FIX: cisco_qos: Fix crashing check for some cases where the QoS class cannot be found...
Multisite:
* 4365 FIX: Service availability: Host down could not be rewritten to other states like CRIT
diff --git a/checks/cisco_qos b/checks/cisco_qos
index 9119cc7..82a20ba 100644
--- a/checks/cisco_qos
+++ b/checks/cisco_qos
@@ -185,7 +185,7 @@ def check_cisco_qos(item, params, info):
# Gather the interface id by class_name
if_id = None
for iid, iid2 in ifs.iteritems():
- if if_name == if_names[iid2]:
+ if if_name == if_names.get(iid2):
if_id = iid2
break