Module: check_mk
Branch: master
Commit: 9f27f16cc8171f93095970b6640c75a4e98b5b3d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f27f16cc8171f…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jul 24 17:39:48 2017 +0200
Updated werk 4983
Change-Id: I028b27e46364ce8ce9ed6f49f0d1463376667079
---
.werks/4983 | 12 ++++++++++++
checks/brocade_fcport | 38 +++++++++++++++++++-------------------
2 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/.werks/4983 b/.werks/4983
index 27caeb4..dbb709f 100644
--- a/.werks/4983
+++ b/.werks/4983
@@ -8,4 +8,16 @@ State: unknown
Version: 1.5.0i1
Date: 1500909872
+Brocade specific SNMP table
+.1.3.6.1.4.1.1588.2.1.1.1.6.2.1
+does not provide speed information for the interfaces.
+Thus this check plugins had to fetch another SNMP table
+.1.3.6.1.2.1.31.1.1.1.15
+from IF-MIB.
+Unfortunately these tables are not directly connected by index
+and the assumed speed information could be wrong for some
+devices.
+http://community.brocade.com/t5/Fibre-Channel-SAN/SNMP-FC-port-speed/td-p/64980
+says that "1073741824" from if-table correlates with index 1 from
+brocade-if-table.
diff --git a/checks/brocade_fcport b/checks/brocade_fcport
index 54fe2b0..bb7e604 100644
--- a/checks/brocade_fcport
+++ b/checks/brocade_fcport
@@ -233,22 +233,22 @@ def check_brocade_fcport(item, params, parsed):
if found_entry is None:
return 3, "No SNMP data found"
- index = if_entry["index"]
- txwords = if_entry["txwords"]
- rxwords = if_entry["rxwords"]
- txframes = if_entry["txframes"]
- rxframes = if_entry["rxframes"]
- notxcredits = if_entry["notxcredits"]
- rxcrcs = if_entry["rxcrcs"]
- rxencinframes = if_entry["rxencinframes"]
- rxencoutframes = if_entry["rxencoutframes"]
- c3discards = if_entry["c3discards"]
- brocade_speed = if_entry["brocade_speed"]
- porttype = if_entry["porttype"]
- is_isl = if_entry["is_isl"]
- isl_speed = if_entry["islspeed"]
- bbcredits = if_entry["bbcredits"]
- speed = if_entry["ifspeed"]
+ index = found_entry["index"]
+ txwords = found_entry["txwords"]
+ rxwords = found_entry["rxwords"]
+ txframes = found_entry["txframes"]
+ rxframes = found_entry["rxframes"]
+ notxcredits = found_entry["notxcredits"]
+ rxcrcs = found_entry["rxcrcs"]
+ rxencinframes = found_entry["rxencinframes"]
+ rxencoutframes = found_entry["rxencoutframes"]
+ c3discards = found_entry["c3discards"]
+ brocade_speed = found_entry["brocade_speed"]
+ porttype = found_entry["porttype"]
+ is_isl = found_entry["is_isl"]
+ isl_speed = found_entry["islspeed"]
+ bbcredits = found_entry["bbcredits"]
+ speed = found_entry["ifspeed"]
this_time = time.time()
average = params.get("average") # range in minutes
@@ -375,9 +375,9 @@ def check_brocade_fcport(item, params, parsed):
# P O R T S T A T E
for dev_state, state_key, state_info, warn_states, state_map in [
- (if_entry["phystate"], "phystate", "Physical", [1,
6], brocade_fcport_phystates),
- (if_entry["opstate"], "opstate", "Operational", [1,
3], brocade_fcport_opstates),
- (if_entry["admstate"], "admstate",
"Administrative", [0, 1, 3], brocade_fcport_admstates),
+ (found_entry["phystate"], "phystate", "Physical",
[1, 6], brocade_fcport_phystates),
+ (found_entry["opstate"], "opstate", "Operational",
[1, 3], brocade_fcport_opstates),
+ (found_entry["admstate"], "admstate",
"Administrative", [0, 1, 3], brocade_fcport_admstates),
]:
state = 0
errorflag = ""