Module: check_mk
Branch: master
Commit: f5f24e1c5370572a8f04708963942af5e136fc88
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f5f24e1c537057…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Apr 10 12:06:53 2014 +0200
ibm_svc_portfc: New check for status of FC Ports in IBM SVC / Storwize V3700 / V7000 devices
---
.werks/804 | 8 ++++
ChangeLog | 1 +
agents/special/agent_ibmsvc | 11 ++++--
checkman/ibm_svc_portfc | 22 +++++++++++
checks/ibm_svc_portfc | 63 +++++++++++++++++++++++++++++++
web/plugins/wato/datasource_programs.py | 3 +-
6 files changed, 103 insertions(+), 5 deletions(-)
diff --git a/.werks/804 b/.werks/804
new file mode 100644
index 0000000..d706792
--- /dev/null
+++ b/.werks/804
@@ -0,0 +1,8 @@
+Title: ibm_svc_portfc: New check for status of FC Ports in IBM SVC / Storwize V3700 / V7000 devices
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1397124376
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 8e4293a..c783c60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
* 0879 windows_tasks: output last and next run time
* 0881 rmon_stats: now needs to be activated via a rule in order to be inventorized...
NOTE: Please refer to the migration notes!
+ * 0804 ibm_svc_portfc: New check for status of FC Ports in IBM SVC / Storwize V3700 / V7000 devices
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/agents/special/agent_ibmsvc b/agents/special/agent_ibmsvc
index 91b4e07..d7347df 100755
--- a/agents/special/agent_ibmsvc
+++ b/agents/special/agent_ibmsvc
@@ -61,10 +61,11 @@ OPTIONS:
-i MODULES, --modules MODULES Modules to query. This is a comma separated list of
which may contain the keywords "lshost", "lslicense",
"lsmdisk", "lsmdiskgrp", "lsnode", "lsnodestats",
- "lssystem", "lssystemstats", "lseventlog" or "all" to
- define which information should be queried from the
- device. You can define to use only view of them to
- optimize performance. The default is "all".
+ "lssystem", "lssystemstats", "lseventlog", "lsportfc"
+ or "all" to define which information should be
+ queried from the device. You can define to use only
+ view of them to optimize performance. The default is
+ "all".
""")
@@ -110,6 +111,8 @@ command_options = {
"command" : "lssystemstats -nohdr -delim :"},
"lseventlog" : {"section_header" : "ibm_svc_eventlog", "active" : False,
"command" : "lseventlog -expired no -fixed no -monitoring no -order severity -message no -delim : -nohdr"},
+ "lsportfc" : {"section_header" : "ibm_svc_portfc", "active" : False,
+ "command" : "lsportfc -nohdr -delim :"},
}
for o,a in opts:
diff --git a/checkman/ibm_svc_portfc b/checkman/ibm_svc_portfc
new file mode 100644
index 0000000..0421b7c
--- /dev/null
+++ b/checkman/ibm_svc_portfc
@@ -0,0 +1,22 @@
+title: IBM SVC / Storwize V3700 / V7000: Status of FC Ports
+agents: ibm_svc
+catalog: hw/storagehw/ibm
+license: GPL
+distribution: check_mk
+description:
+ Checks the status of FC Ports in an IBM SVC / Storwize V3700 / V7000
+ device.
+
+ Status {active} is {OK}, every other status is {CRIT}.
+
+ Please note: You need the Special Agent agent_ibmsvc to retrieve the monitoring
+ data from the device. Your monitoring user must be able to SSH to the device
+ with SSH Key Authentification. Please exchange SSH key. The Special Agent itself
+ can be configured by WATO.
+
+item:
+ The ID of the FC Port.
+
+inventory:
+ Creates one check for every FC Port in the IBM SVC / Storwize V3700 / V7000 device
+ with status {active}.
diff --git a/checks/ibm_svc_portfc b/checks/ibm_svc_portfc
new file mode 100644
index 0000000..6b96782
--- /dev/null
+++ b/checks/ibm_svc_portfc
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# Example output from agent:
+# <<<ibm_svc_portfc:sep(58)>>>
+# 0:1:1:fc:8Gb:1:node1:5005076803042126:030400:active:switch
+# 1:2:2:fc:8Gb:1:node1:5005076803082126:040400:active:switch
+# 2:3:3:fc:N/A:1:node1:50050768030C2126:000000:inactive_unconfigured:none
+# 3:4:4:fc:N/A:1:node1:5005076803102126:000000:inactive_unconfigured:none
+# 8:1:1:fc:8Gb:2:node2:5005076803042127:030500:active:switch
+# 9:2:2:fc:8Gb:2:node2:5005076803082127:040500:active:switch
+# 10:3:3:fc:N/A:2:node2:50050768030C2127:000000:inactive_unconfigured:none
+# 11:4:4:fc:N/A:2:node2:5005076803102127:000000:inactive_unconfigured:none
+
+def inventory_ibm_svc_portfc(info):
+ inventory = []
+ for fc_port_id, fc_io_port_id, port_id, fc_port_type, port_speed, \
+ node_id, node_name, WWPN, nportid, fc_port_status, attachment in info:
+ if fc_port_status == "active":
+ inventory.append( (fc_port_id, None) )
+ return inventory
+
+def check_ibm_svc_portfc(item, _no_params, info):
+ for fc_port_id, fc_io_port_id, port_id, fc_port_type, port_speed, \
+ node_id, node_name, WWPN, nportid, fc_port_status, attachment in info:
+ if fc_port_id == item:
+ if fc_port_status == "active":
+ return 0, "FC Port %s is %s" % (fc_port_id, fc_port_status)
+ else:
+ return 2, "FC Port %s is %s" % (fc_port_id, fc_port_status)
+
+ return 3, "FC Port %s not found in agent output" % item
+
+check_info["ibm_svc_portfc"] = {
+ "check_function" : check_ibm_svc_portfc,
+ "inventory_function" : inventory_ibm_svc_portfc,
+ "service_description" : "IBM SVC FC Port %s",
+ "has_perfdata" : False,
+}
+
diff --git a/web/plugins/wato/datasource_programs.py b/web/plugins/wato/datasource_programs.py
index 990095a..dc3e306 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -274,9 +274,10 @@ register_rule(group,
( "lssystem", _("System Info") ),
( "lssystemstats", _("System Stats") ),
( "lseventlog", _("Event Log") ),
+ ( "lsportfc", _("FC Ports") ),
],
default_value = [ "lshost", "lslicense", "lsmdisk", "lsmdiskgrp", "lsnode",
- "lsnodestats", "lssystem", "lssystemstats", ],
+ "lsnodestats", "lssystem", "lssystemstats", "lsportfc" ],
allow_empty = False,
),
title = _("Retrieve information about..."),
Module: check_mk
Branch: master
Commit: 032e786dc41a645fb56338d68174999703297600
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=032e786dc41a64…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 10 12:05:16 2014 +0200
FIX check_bi_local.py: fix crash in case of non-ascii characters
When you have an aggregate whos name contain a non-ascii character then
the <tt>check_bi_local.py</tt> would fail and you would miss all aggregates
from the point on. This has been fixed by encoding the output with UTF-8.
---
.werks/882 | 11 +++++++++++
ChangeLog | 1 +
doc/treasures/localchecks/check_bi_local.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/882 b/.werks/882
new file mode 100644
index 0000000..df31e44
--- /dev/null
+++ b/.werks/882
@@ -0,0 +1,11 @@
+Title: check_bi_local.py: fix crash in case of non-ascii characters
+Level: 2
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1397124240
+
+When you have an aggregate whos name contain a non-ascii character then
+the <tt>check_bi_local.py</tt> would fail and you would miss all aggregates
+from the point on. This has been fixed by encoding the output with UTF-8.
diff --git a/ChangeLog b/ChangeLog
index 8e4293a..c2f97f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,7 @@
* 0604 FIX: windows_updates: now handles situations with forced reboot and no limits correctly
* 0605 FIX: enterasys_cpu_util enterasys_lsnat: syntax fixes
* 0889 FIX: logwatch: fix case where rule wouldn't be applied...
+ * 0882 FIX: check_bi_local.py: fix crash in case of non-ascii characters...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled by filter)
diff --git a/doc/treasures/localchecks/check_bi_local.py b/doc/treasures/localchecks/check_bi_local.py
index 1f7963a..4ebdef7 100755
--- a/doc/treasures/localchecks/check_bi_local.py
+++ b/doc/treasures/localchecks/check_bi_local.py
@@ -112,5 +112,5 @@ for name, state, output in data[1:]:
text = "%d %s - %s" % (state_nr, descr, state)
if output:
text += " - " + output
- print text
+ print text.encode("utf-8")
Module: check_mk
Branch: master
Commit: 3cc59390d568d096c5c5d4ad7ec845bc91b1ce3c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3cc59390d568d0…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Thu Apr 10 10:41:02 2014 +0200
clarified help texts of interface and switch port inventory rule
---
web/plugins/wato/check_parameters.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 5fe4377..15918e0 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -255,14 +255,14 @@ register_rule(group + '/' + subgroup_inventory,
default_value = [ '6', '32', '62', '117' ]
)),
("rmon", Checkbox(
- title = _("RMON statistics data"),
- help = _("If you enable this option then for every switch port an additional service will be created "
- "that is always OK and collects RMON data. This will give you detailed information about "
- "the distribution about the packet sizes that are transferred over the port. Note: currently "
+ title = _("Collect RMON statistics data"),
+ help = _("If you enable this option, for every RMON capable switch port an additional service will "
+ "be created which is always OK and collects RMON data. This will give you detailed information "
+ "about the distribution of packet sizes transferred over the port. Note: currently "
"this extra RMON check does not honor the inventory settings for switch ports. In a future "
- "version of Check_MK RMON data will be added to the normal interface service and not add "
+ "version of Check_MK RMON data may be added to the normal interface service and not add "
"an additional service."),
- label = _("Create extra service with RMON statistics data"),
+ label = _("Create extra service with RMON statistics data (if available for the device)"),
)),
],
help = _('This rule can be used to control the inventory for network ports. '
Module: check_mk
Branch: master
Commit: ec91def6450950385aed975036794113f5ece913
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ec91def6450950…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Thu Apr 10 10:26:39 2014 +0200
snmp scan function now first scans system description oid
---
checks/rmon_stats | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/checks/rmon_stats b/checks/rmon_stats
index 1c25688..9f7f3ef 100644
--- a/checks/rmon_stats
+++ b/checks/rmon_stats
@@ -73,5 +73,7 @@ check_info["rmon_stats"] = {
]),
# for the scan we need to check for any single object in the RMON tree,
# we choose netDefaultGateway in the hope that it will always be present
- 'snmp_scan_function' : lambda oid: oid(".1.3.6.1.2.1.16.19.12.0") != None,
+ 'snmp_scan_function' : lambda oid: ( oid(".1.3.6.1.2.1.1.1.0").lower().startswith("cisco") \
+ or oid(".1.3.6.1.2.1.1.1.0").startswith("10G Managed Switch)" ) \
+ and oid(".1.3.6.1.2.1.16.19.12.0") != None,
}
Module: check_mk
Branch: master
Commit: 776fb043bde528ba2c90815640b26ac4083c1f8c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=776fb043bde528…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 10 10:19:04 2014 +0200
rmon_stats: now needs to be activated via a rule in order to be inventorized
The relatively new <tt>rmon_stats</tt> check creates one new service per network
interface (if RMON is enabled on your switch). In order to keep low the number
of services and the SNMP traffic this check is now <b>disabled per default</b>.
In order to have RMON checks created please activate RMON in the rule set
<i>Network Interface and Switch Port Inventory</i>.
---
.werks/881 | 13 +++++++++++++
ChangeLog | 2 ++
checks/if.include | 2 +-
checks/rmon_stats | 10 ++++++----
web/plugins/wato/check_parameters.py | 18 ++++++++++++++----
5 files changed, 36 insertions(+), 9 deletions(-)
diff --git a/.werks/881 b/.werks/881
new file mode 100644
index 0000000..a6788f5
--- /dev/null
+++ b/.werks/881
@@ -0,0 +1,13 @@
+Title: rmon_stats: now needs to be activated via a rule in order to be inventorized
+Level: 2
+Component: checks
+Version: 1.2.5i3
+Date: 1397117799
+Class: incomp
+
+The relatively new <tt>rmon_stats</tt> check creates one new service per network
+interface (if RMON is enabled on your switch). In order to keep low the number
+of services and the SNMP traffic this check is now <b>disabled per default</b>.
+
+In order to have RMON checks created please activate RMON in the rule set
+<i>Network Interface and Switch Port Inventory</i>.
diff --git a/ChangeLog b/ChangeLog
index b454eb6..8e4293a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,8 @@
* 0829 oracle_tablespaces: improved formatting of levels text in check output...
* 0757 Linux multipath check can now use the alias instead of the UUID as item...
* 0879 windows_tasks: output last and next run time
+ * 0881 rmon_stats: now needs to be activated via a rule in order to be inventorized...
+ NOTE: Please refer to the migration notes!
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/checks/if.include b/checks/if.include
index 897fb12..ba97de3 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -136,7 +136,7 @@ def inventory_if_common(info, has_nodeinfo = False):
# Determine whether single, grouped or both
for line in info:
- node, line = if_extract_node(line,has_nodeinfo)
+ node, line = if_extract_node(line, has_nodeinfo)
ifIndex, ifDescr, ifType, ifSpeed, ifOperStatus, ifInOctets, \
inucast, inmcast, inbcast, ifInDiscards, ifInErrors, ifOutOctets, \
outucast, outmcast, outbcast, ifOutDiscards, ifOutErrors, \
diff --git a/checks/rmon_stats b/checks/rmon_stats
index d0ab8ea..1c25688 100644
--- a/checks/rmon_stats
+++ b/checks/rmon_stats
@@ -31,10 +31,12 @@
def inventory_rmon_stats(info):
- inventory = []
- for line in info:
- inventory.append((line[0], None))
- return inventory
+ settings = host_extra_conf_merged(g_hostname, inventory_if_rules)
+ if settings.get("rmon"):
+ inventory = []
+ for line in info:
+ inventory.append((line[0], None))
+ return inventory
def check_rmon_stats(item, _no_params, info):
bytes = { 1: 'bcast', 2: 'mcast', 3: '0-63b', 4: '64-127b', 5: '128-255b', 6: '256-511b', 7: '512-1023b', 8: '1024-1518b' }
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 3b6d28f..5fe4377 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -222,9 +222,9 @@ _if_porttype_choices = [
"fcipLink(224)" ), ("225", "rpr(225)" ), ("226", "qam(226)" ), ("227", "lmp(227)" ), ("228",
"cblVectaStar(228)" ), ("229", "docsCableMCmtsDownstream(229)" ), ("230", "adsl2(230)" ), ]
-register_rule(group + '/' + subgroup_networking,
+register_rule(group + '/' + subgroup_inventory,
varname = "inventory_if_rules",
- title = _("Network interface and switch port Inventory"),
+ title = _("Network Interface and Switch Port Inventory"),
valuespec = Dictionary(
elements = [
("use_desc", Checkbox(
@@ -254,6 +254,16 @@ register_rule(group + '/' + subgroup_networking,
toggle_all = True,
default_value = [ '6', '32', '62', '117' ]
)),
+ ("rmon", Checkbox(
+ title = _("RMON statistics data"),
+ help = _("If you enable this option then for every switch port an additional service will be created "
+ "that is always OK and collects RMON data. This will give you detailed information about "
+ "the distribution about the packet sizes that are transferred over the port. Note: currently "
+ "this extra RMON check does not honor the inventory settings for switch ports. In a future "
+ "version of Check_MK RMON data will be added to the normal interface service and not add "
+ "an additional service."),
+ label = _("Create extra service with RMON statistics data"),
+ )),
],
help = _('This rule can be used to control the inventory for network ports. '
'You can configure the port types and port states for inventory'
@@ -423,7 +433,7 @@ register_rule(group + '/' + subgroup_inventory,
register_rule(group + '/' + subgroup_inventory,
varname = "inventory_sap_values",
- title = _('SAP Single Value Inventory'),
+ title = _('SAP R/3 Single Value Inventory'),
valuespec = Dictionary(
elements = [
('match', Alternative(
@@ -564,7 +574,7 @@ register_check_parameters(
register_check_parameters(
subgroup_storage,
"brocade_fcport",
- _("Brocade FC FibreChannel ports"),
+ _("Brocade FibreChannel ports"),
Dictionary(
elements = [
("bw",
Module: check_mk
Branch: master
Commit: 60052b82632fff563e01a1718a77bffbc3acfe13
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=60052b82632fff…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 9 16:29:29 2014 +0200
FIX logwatch: fix case where rule wouldn't be applied
If you are using CMC core <tt>cmk -v</tt> on the commandline and
had inventorized the checks by a newer version of Check_MK then the
reclassification patterns of logwatch would not work. This has been
fixed. The reason was that the inventory now correctly sets <tt>None</tt>
as a parameter whereas older versions used an empty string.
---
.werks/889 | 13 +++++++++++++
ChangeLog | 1 +
checks/logwatch | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/889 b/.werks/889
new file mode 100644
index 0000000..b59ae2a
--- /dev/null
+++ b/.werks/889
@@ -0,0 +1,13 @@
+Title: logwatch: fix case where rule wouldn't be applied
+Level: 2
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1397053661
+
+If you are using CMC core <tt>cmk -v</tt> on the commandline and
+had inventorized the checks by a newer version of Check_MK then the
+reclassification patterns of logwatch would not work. This has been
+fixed. The reason was that the inventory now correctly sets <tt>None</tt>
+as a parameter whereas older versions used an empty string.
diff --git a/ChangeLog b/ChangeLog
index c4a879a..8ed3c48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,7 @@
* 0603 FIX: cmciii checks: more general scan function plus perf-o-meters for humidity and temperature checks
* 0604 FIX: windows_updates: now handles situations with forced reboot and no limits correctly
* 0605 FIX: enterasys_cpu_util enterasys_lsnat: syntax fixes
+ * 0889 FIX: logwatch: fix case where rule wouldn't be applied...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled by filter)
diff --git a/checks/logwatch b/checks/logwatch
index d57316e..b238f32 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -286,7 +286,7 @@ def check_logwatch(item, params, info):
# Check_MK creates an empty string if the precompile function has
# not been exectued yet. The precomile function creates an empty
# list when no rules/patterns are defined.
- if params != '':
+ if params not in ('', None):
patterns = params # patterns already precompiled
else:
patterns = logwatch_precompile(g_hostname, item, None)