Module: check_mk
Branch: master
Commit: a63e2e523e270054178df6922b2e287a78c66478
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a63e2e523e2700…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Jun 17 17:50:36 2016 +0200
3638 FIX cisco_qos: fixed wrong unit handling
---
.werks/3638 | 10 ++++++++++
ChangeLog | 1 +
checks/cisco_qos | 6 +++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/3638 b/.werks/3638
new file mode 100644
index 0000000..8afdb04
--- /dev/null
+++ b/.werks/3638
@@ -0,0 +1,10 @@
+Title: cisco_qos: fixed wrong unit handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1466178621
+
+
diff --git a/ChangeLog b/ChangeLog
index 2a6f4a9..4da139f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -273,6 +273,7 @@
* 3545 FIX: netapp_api_vs_traffic: fixed crash when NFSv4.1 information was
available
* 3143 FIX: windows agent: fixed some minor memory and handle leaks
* 3144 FIX: bugfix: replacing pipe symbol in plugin output was broken
+ * 3638 FIX: cisco_qos: fixed wrong unit handling
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/cisco_qos b/checks/cisco_qos
index 4dee684..e7fa26e 100644
--- a/checks/cisco_qos
+++ b/checks/cisco_qos
@@ -235,11 +235,11 @@ def check_cisco_qos(item, params, info):
# 4 ratioRemaining
# 5 perThousand
# 6 perMillion
- unit = int(if_qos_bandwidth_units[config[b_key]])
+ qos_unit = int(if_qos_bandwidth_units[config[b_key]])
qos_bandwidth = saveint(if_qos_bandwidth[config[b_key]])
- if unit == 1:
+ if qos_unit == 1:
speed = qos_bandwidth * 1000
- elif unit == 3:
+ elif qos_unit == 3:
remaining = (speed / 100) * qos_bandwidth
speed = speed - remaining
break