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",