Module: check_mk
Branch: master
Commit: af4efaf75de4f8b4948061e67a7ef04f0060352d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=af4efaf75de4f8…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jun 11 14:43:17 2018 +0200
6131 FIX brocade_fcport: Fixed wrong look up of indices which might lead to stale
services
Change-Id: Ie6f723aa77b6ffefee0c6ed8b093d2d8d058db9a
---
.werks/6131 | 10 ++++++++++
checks/brocade_fcport | 5 +++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/6131 b/.werks/6131
new file mode 100644
index 0000000..377e798
--- /dev/null
+++ b/.werks/6131
@@ -0,0 +1,10 @@
+Title: brocade_fcport: Fixed wrong look up of indices which might lead to stale services
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1528720852
+Class: fix
+
+
diff --git a/checks/brocade_fcport b/checks/brocade_fcport
index d3e5f1b..a2e3ff7 100644
--- a/checks/brocade_fcport
+++ b/checks/brocade_fcport
@@ -132,11 +132,12 @@ def parse_brocade_fcport(info):
c3discards, brocade_speed, portname, porttype, ifspeed in if_table:
# Since FW v8.0.1b [rx/tx]words are no longer available
+ # Use 64bit counters if available
bbcredits = None
- if txwords == "" or rxwords == "":
+ if len(if64_info) > 0:
fcmgmt_portstats = []
for oidend, tx_elements, rx_elements, bbcredits_64 in if64_info:
- if index == int(oidend.split(".")[-1]):
+ if index == oidend.split(".")[-1]:
fcmgmt_portstats = [ binstring_to_int(tx_elements),
binstring_to_int(rx_elements),
binstring_to_int(bbcredits_64) ]