Module: check_mk
Branch: master
Commit: d59cb3040382d4054c77cae2d987d19eadbf4084
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d59cb3040382d4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 8 15:31:53 2010 +0100
Made check handle phystate "noSystemControlAccessToSlot" (10)
The check also handles unknown states better now
---
ChangeLog | 2 ++
checks/fc_brocade_port_detailed | 9 ++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6da71c8..97e3b34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -104,6 +104,8 @@
* Linux Agent: Fixed <<<cpu>>> output on SPARC machines with
openSUSE
* df_netapp/df_netapp32: Made check inventory resistant against empty size values
* df_netapp32: Added better detection for possible 32bit counter wrap
+ * fc_brocade_port_detailed: Made check handle phystate
"noSystemControlAccessToSlot" (10)
+ The check also handles unknown states better now
Multisite:
* The custom open/close states of custom links are now stored for each
diff --git a/checks/fc_brocade_port_detailed b/checks/fc_brocade_port_detailed
index dbbcb24..0d65e1a 100644
--- a/checks/fc_brocade_port_detailed
+++ b/checks/fc_brocade_port_detailed
@@ -27,8 +27,8 @@
# targetstate is 1 (used) or 0 (unused)
# info columns: INDEX PHYSTATE OPSTATE TXWORDS RXWORDS
-# 0 1 2 3 4 5
6 7 8 9
-brocade_phystate_names = [ '', 'noCard', 'noTransceiver',
'laserFault', 'noLight', 'noSync', 'inSync',
'portFault', 'diagFault', 'lockRef' ]
+# 0 1 2 3 4 5
6 7 8 9 10
+brocade_phystate_names = [ '', 'noCard', 'noTransceiver',
'laserFault', 'noLight', 'noSync', 'inSync',
'portFault', 'diagFault', 'lockRef',
'noSystemControlAccessToSlot' ]
# 0 1 2 3 4
brocade_opstate_names = [ 'unknown', 'online', 'offline',
'testing', 'faulty' ]
@@ -37,6 +37,7 @@ fc_brocade_port_detailed_default_levels = ( (1, 0.1), (1, 0.1), (1,
0.1), (2, 16
def inventory_brocade_port(checkname, info):
porttable, isltable = info
inventory = []
+ print
for index, phystate, opstate, txwords, rxwords, txframes, rxframes, crcerrors,
encout, c3discards in porttable:
state = (int(phystate), int(opstate))
if state == (4,2):
@@ -116,8 +117,10 @@ def check_brocade_port(portno, params, info):
if (phy,op) == (phystate, opstate):
nagioscode = ncode
break
+ print phystate, len(brocade_phystate_names)
return (nagioscode, "%s - physical state %s(%d), opstate %s(%d)" % (
- nagios_state_names[nagioscode], brocade_phystate_names[phystate],
+ nagios_state_names[nagioscode],
+ (len(brocade_phystate_names) > phystate and
brocade_phystate_names[phystate] or 'UNHANDLED'),
phystate, brocade_opstate_names[opstate], opstate), perfdata)
# Now check rates of various error counters