Module: check_mk
Branch: master
Commit: 935d2b680590ca5efdf1c9387b55d5593c4c51c8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=935d2b680590ca…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Fri May 13 11:51:16 2016 +0200
werk 3131 is actually incompatible. Also reduced the impact of this incompatibility
---
.werks/3131 | 6 +++++-
checks/if64.include | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.werks/3131 b/.werks/3131
index a6ba5e5..b783704 100644
--- a/.werks/3131
+++ b/.werks/3131
@@ -1,7 +1,7 @@
Title: if64, if64adm: These checks now display the speed of interfaces slower than 1Mbit
correctly
Level: 1
Component: checks
-Compatible: compat
+Compatible: incomp
Version: 1.2.9i1
Date: 1462952497
Class: fix
@@ -10,3 +10,7 @@ Previously, the two checks relied on a counter that has 10^6 bit
resolution, so
less than 1Mbit speed were reported as "speed unknown", whereas the if check
was capped at 4Gbit
speed, reporting wrong speed for faster interfaces.
The if64, if64adm checks have now been updated to provide the correct speed for all
interfaces.
+
+This change is incompatible as the interfaces previously reported as "speed
unknown" will now report
+warn state as the previously discovered speed (0) was stored during service discovery and
deviations from
+that are reported. You need to re-discover these services to get rid of the warning.
diff --git a/checks/if64.include b/checks/if64.include
index fe9a65e..74194e3 100644
--- a/checks/if64.include
+++ b/checks/if64.include
@@ -35,7 +35,10 @@ 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
- real_speed = (saveint(line[-1]) * 1000000) + (saveint(line[4]) % 1000000)
+ if line[-1] == "0":
+ real_speed = saveint(line[4])
+ else:
+ real_speed = saveint(line[-1]) * 1000000
parsed.append(line[:4] + [real_speed] + line[5:-1])
return parsed