Module: check_mk
Branch: master
Commit: 8551bd841338a862a38975fe6374f010f9d87eb6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8551bd841338a8…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Sep 1 15:17:16 2014 +0200
#1176 winperf_msx_queues: The list of counters for inventory can now be configured host
based using wato
---
.werks/1176 | 9 +++++++++
ChangeLog | 1 +
checks/winperf_msx_queues | 10 ++++++++++
web/plugins/wato/check_parameters.py | 24 ++++++++++++++++++++++++
4 files changed, 44 insertions(+)
diff --git a/.werks/1176 b/.werks/1176
new file mode 100644
index 0000000..9bf1175
--- /dev/null
+++ b/.werks/1176
@@ -0,0 +1,9 @@
+Title: winperf_msx_queues: The list of counters for inventory can now be configured host
based using wato
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1409577386
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 529707a..02982da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,7 @@
* 1103 windows agent: now able to omit context text of logfiles...
* 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
* 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/winperf_msx_queues b/checks/winperf_msx_queues
index fabe7cd..c7a8f18 100644
--- a/checks/winperf_msx_queues
+++ b/checks/winperf_msx_queues
@@ -64,9 +64,19 @@ winperf_msx_queues = {
"Poison Queue Length" : "44",
}
+winperf_msx_queues_inventory = []
+
def inventory_winperf_msx_queues(info):
num_instances = int(info[1][0])
if num_instances > 0:
+ # Its possible to set the wanted queues via wato
+ inventory_rules = {}
+ for rulset in host_extra_conf(g_hostname, winperf_msx_queues_inventory):
+ inventory_rules.update(dict(rulset))
+ # In case that rules for this host are set,
+ # only use this rules
+ if inventory_rules:
+ winperf_msx_queues = inventory_rules
return [ (name, "msx_queues_default_levels") for name in
winperf_msx_queues ]
def check_winperf_msx_queues(item, params, info):
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index db81a77..dee31e8 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3955,6 +3955,30 @@ register_rule(group + '/' + subgroup_networking,
match = 'all',
)
+register_rule(group + '/' + subgroup_inventory,
+ varname = "winperf_msx_queues_inventory",
+ title = _('Microsoft Exchange Queues Inventory'),
+ help = _('Per default all Counters a preconfigured in the check. '
+ 'It needed it is possible to overwrite that with this rule. '
+ 'To do that, knowledge about the Agent Output is needed. '),
+ valuespec = ListOf(
+ Tuple(
+ elements = [
+ TextAscii(
+ title = _("Name of Counter"),
+ help = _("Name of the Counter to be
monitored."),
+ allow_empty = False,
+ ),
+ Integer(
+ title = _("Offset"),
+ help = _("The Offset of the information relative to
counter base"),
+ allow_empty = False,
+ ),
+ ]),
+ add_label = _("Add Counter")),
+ match = 'all',
+)
+
register_check_parameters(
subgroup_applications,
"mailqueue_length",