Module: check_mk
Branch: master
Commit: 38256b17db97fce35849cc98332ad9b5f9c48ded
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38256b17db97fc…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Mar 30 11:37:15 2017 +0200
4576 FIX if64, if64adm: Fixed interface speed handling, if highspeed data is not available
or zero
Change-Id: Idef4cb2ac237999ae62766007dec5a46cbbb5d0f
---
.werks/4576 | 11 +++++++++++
checks/if64.include | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4576 b/.werks/4576
new file mode 100644
index 0000000..7d74940
--- /dev/null
+++ b/.werks/4576
@@ -0,0 +1,11 @@
+Title: if64, if64adm: Fixed interface speed handling, if highspeed data is not available
or zero
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1490866454
+
+
diff --git a/checks/if64.include b/checks/if64.include
index 74194e3..69853ce 100644
--- a/checks/if64.include
+++ b/checks/if64.include
@@ -35,7 +35,7 @@ def parse_if64(info):
# ifHighSpeed (idx 21) can't represent interfaces with less than 10^6
bit bandwidth,
# ifSpeed (idx 4) is capped at 4GBit.
# combine the two to get the actual interface speed
- if line[-1] == "0":
+ if line[-1] in [ "0", "" ]:
real_speed = saveint(line[4])
else:
real_speed = saveint(line[-1]) * 1000000