Module: check_mk
Branch: master
Commit: 6952d9a44d6d35508e9d003edec13481d7bf97fe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6952d9a44d6d35…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 23 14:24:46 2011 +0200
brocade_fcport: inventory handles invalid data better
---
ChangeLog | 1 +
checks/brocade_fcport | 11 +++++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 06e639c..b46672e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
* brocade_port: check for Brocade FC ports has been rewritten with
lots of new features.
* AIX agent now simulates <<<netctr>>> output (by Jörg Linge)
+ * brocade_fcport: inventory handles invalid data better
Multisite:
* Introduced basic infrastructure for multilanguage support in Multisite
diff --git a/checks/brocade_fcport b/checks/brocade_fcport
index 52f6cf8..56d09a9 100644
--- a/checks/brocade_fcport
+++ b/checks/brocade_fcport
@@ -74,10 +74,13 @@ def inventory_brocade_fcport(checkname, info):
for item in info[0]:
if len(item) == 14:
- index = int(item[0])
- phystate = int(item[1])
- opstate = int(item[2])
- admstate = int(item[3])
+ try:
+ index = int(item[0])
+ phystate = int(item[1])
+ opstate = int(item[2])
+ admstate = int(item[3])
+ except: # missing vital data. Skipping this port
+ continue
portname = item[13]
is_isl = item[0] in isl_ports