Module: check_mk
Branch: master
Commit: 359e639588c9500db22de5faa0c7f8f5522b1ad3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=359e639588c950…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Sep 1 17:04:30 2014 +0200
#0656 brocade_fcport: inventory rule can now choose upon physical und operations states as
well, state choices were also updated
---
.werks/656 | 9 +++++++++
ChangeLog | 1 +
checks/brocade_fcport | 7 +++++--
web/plugins/wato/check_mk_configuration.py | 24 ++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 18 +++++++++++++++++-
5 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/.werks/656 b/.werks/656
new file mode 100644
index 0000000..c06b0f2
--- /dev/null
+++ b/.werks/656
@@ -0,0 +1,9 @@
+Title: brocade_fcport: inventory rule can now choose upon physical und operations states
as well, state choices were also updated
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1409583785
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index fe7d199..9a938af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,6 +41,7 @@
* 1150 netstat: new check for monitoring TCP/UDP connections and Linux and AIX...
* 0654 oracle_instance: now also monitors the log mode
* 1176 winperf_msx_queues: The list of counters for inventory can now be configured
host based using wato
+ * 0656 brocade_fcport: inventory rule can now choose upon physical und operations
states as well, state choices were also updated
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checks/brocade_fcport b/checks/brocade_fcport
index 21fc214..3e1fbb9 100644
--- a/checks/brocade_fcport
+++ b/checks/brocade_fcport
@@ -27,7 +27,8 @@
# lookup tables for check implementation
# Taken from swFCPortPhyState
brocade_fcport_phystates = [ '', 'noCard', 'noTransceiver',
'laserFault', 'noLight',
- 'noSync', 'inSync', 'portFault',
'diagFault', 'lockRef' ]
+ 'noSync', 'inSync', 'portFault',
'diagFault', 'lockRef',
+ 'validating', 'invalidModule',
'noSigDet', 'unkown' ]
# Taken from swFCPortOpStatus
brocade_fcport_opstates = [ 'unknown', 'online', 'offline',
'testing', 'faulty' ]
# Taken from swFCPortAdmStatus
@@ -50,7 +51,7 @@ isl_speed = {
}
# settings for inventory: which ports should be inventorized
-brocade_fcport_inventory_phystates = [ 3, 4, 5, 6, 7, 8, 9, ]
+brocade_fcport_inventory_phystates = [ 3, 4, 5, 6, 7, 8, 9, 10 ]
brocade_fcport_inventory_opstates = [ 1, 2, 3, 4, ]
brocade_fcport_inventory_admstates = [ 1, 3, 4, ]
brocade_fcport_inventory_use_portname = True # use swFCPortName as part of service
description
@@ -87,6 +88,8 @@ def inventory_brocade_fcport(info):
uses_portname = settings.get('use_portname',
brocade_fcport_inventory_use_portname)
shows_isl = settings.get('show_isl',
brocade_fcport_inventory_show_isl)
admstates = settings.get('admstates',
brocade_fcport_inventory_admstates)
+ opstates = settings.get('opstates',
brocade_fcport_inventory_opstates)
+ phystates = settings.get('phystates',
brocade_fcport_inventory_phystates)
inventory = []
isl_ports = {}
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index 5af2c78..6f19786 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1264,6 +1264,30 @@ _brocade_fcport_adm_choices = [
( 4, 'faulty(4)'),
]
+_brocade_fcport_op_choices = [
+ ( 0, 'unkown(0)'),
+ ( 1, 'online(1)'),
+ ( 2, 'offline(2)'),
+ ( 3, 'testing(3)'),
+ ( 4, 'faulty(4)'),
+ ]
+
+_brocade_fcport_phy_choices = [
+ ( 1, 'noCard(1)'),
+ ( 2, 'noTransceiver(2)'),
+ ( 3, 'laserFault(3)'),
+ ( 4, 'noLight(4)'),
+ ( 5, 'noSync(5)'),
+ ( 6, 'inSync(6)'),
+ ( 7, 'portFault(7)'),
+ ( 8, 'diagFault(8)'),
+ ( 9, 'lockRef(9)'),
+ ( 10, 'validating(10)'),
+ ( 11, 'invalidModule(11)'),
+ ( 14, 'noSigDet(14)'),
+ ( 255, 'unkown(255)'),
+ ]
+
_if_porttype_choices = [
("1", "other(1)" ), ("2", "regular1822(2)" ),
("3", "hdh1822(3)" ), ("4", "ddnX25(4)" ),
("5", "rfc877x25(5)" ), ("6",
"ethernetCsmacd(6)" ), ("7", "iso88023Csmacd(7)" ),
("8",
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index dee31e8..42d9b8b 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -298,8 +298,24 @@ register_rule(group + '/' + subgroup_inventory,
toggle_all = True,
default_value = ['1', '3', '4' ],
)),
+ ("phystates", ListChoice(title = _("Physical port states to
inventorize"),
+ help = _("When doing inventory on brocade switches only ports with
the given physical "
+ "states will be added to the monitoring system."),
+ choices = _brocade_fcport_phy_choices,
+ columns = 1,
+ toggle_all = True,
+ default_value = [ 3, 4, 5, 6, 7, 8, 9, 10 ]
+ )),
+ ("opstates", ListChoice(title = _("Operational port states to
inventorize"),
+ help = _("When doing inventory on brocade switches only ports with
the given operational "
+ "states will be added to the monitoring system."),
+ choices = _brocade_fcport_op_choices,
+ columns = 1,
+ toggle_all = True,
+ default_value = [ 1, 2, 3, 4 ]
+ )),
],
- help = _('This mule can be used to control the inventory for brocade ports.
'
+ help = _('This rule can be used to control the inventory for brocade ports.
'
'You can configure the port states for inventory '
'and the use of the description as service name.'),
),