Module: check_mk
Branch: master
Commit: 70a9f187f60a028eeda50b9f172f81b4f348e856
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=70a9f187f60a02…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 19 10:41:57 2017 +0200
5230 FIX logwatch/logwatch.ec: fixed "no forwarding" option in rule
"Logwatch Event Console Forwarding"
If you configured a "Logwatch Event Console Forwarding" rule and used the
setting "No forwarding" (Messages are handled by logwatch), the logfiles
weren't handled
by logwatch at all. They simply got dropped.
This has been fixed. If you update to this version you might see an increase
in logwatch checks, if you used the "No forwarding" setting.
---
.werks/5230 | 17 +++++++++++++++++
checks/logwatch | 2 +-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/5230 b/.werks/5230
new file mode 100644
index 0000000..470f1bc
--- /dev/null
+++ b/.werks/5230
@@ -0,0 +1,17 @@
+Title: logwatch/logwatch.ec: fixed "no forwarding" option in rule
"Logwatch Event Console Forwarding"
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1505810291
+Class: fix
+
+If you configured a "Logwatch Event Console Forwarding" rule and used the
+setting "No forwarding" (Messages are handled by logwatch), the logfiles
weren't handled
+by logwatch at all. They simply got dropped.
+
+This has been fixed. If you update to this version you might see an increase
+in logwatch checks, if you used the "No forwarding" setting.
+
+
diff --git a/checks/logwatch b/checks/logwatch
index ec4b69c..88434e4 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -82,7 +82,7 @@ def logwatch_select_forwarded(info):
logfile_name = line[3:-3]
# Is forwarding enabled in general?
- if forward_settings and forward_settings[0] != None:
+ if forward_settings and forward_settings[0]:
if logwatch_ec_forwarding_enabled(forward_settings[0], logfile_name):
forwarded_logs.append(logfile_name)
else: