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)