Process Inventory" rules
Message-ID: <52dfce32.JPbMLDgJ0peLW8q9%ab(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 74a08ee4d59f8fa3ae91ab7811b83b1f4f4c068f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=74a08ee4d59f8f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jan 22 14:56:39 2014 +0100
FIX ps: Now able to skip disabled "Process Inventory" rules
The ps check was unable to detect if a WATO rule "Process Inventory" was
disabled.
---
.werks/262 | 9 +++++++++
ChangeLog | 1 +
checks/ps | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/.werks/262 b/.werks/262
new file mode 100644
index 0000000..a1ce4ac
--- /dev/null
+++ b/.werks/262
@@ -0,0 +1,9 @@
+Title: ps: Now able to skip disabled "Process Inventory" rules
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1390398896
+
+The ps check was unable to detect if a WATO rule "Process Inventory" was
disabled.
diff --git a/ChangeLog b/ChangeLog
index 2cce527..6c5af24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,6 +127,7 @@
* 0460 FIX: endless waiting for printer queues fixed...
* 0260 FIX: Fixed incorrect formatting of checks with long output...
* 0261 FIX: df_netapp32 / df_netapp: Fixed bug with negative size in check output...
+ * 0262 FIX: ps: Now able to skip disabled "Process Inventory" rules...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/ps b/checks/ps
index d02cdcb..6bea6eb 100644
--- a/checks/ps
+++ b/checks/ps
@@ -179,6 +179,11 @@ def inventory_ps_common(invdata, info, handle_perfdata = False):
# Handle new wato style inventory_processes_rules
for rule in inventory_processes_rules:
taglist, hostlist = rule[1:3]
+ if len(rule) >= 4:
+ options = rule[3]
+ if options.get("disabled"):
+ continue
+
# Filter out entries with do not match our current host
if not hosttags_match_taglist(tags_of_host(g_hostname), taglist) \
or not in_extraconf_hostlist(hostlist, g_hostname):