Module: check_mk
Branch: master
Commit: acf79ca80abcb0227b7e23609de15426089f69a1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=acf79ca80abcb0…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Dec 4 10:27:44 2017 +0100
5451 FIX logwatch: Fixed reclassifying mechanism: Patterns did not apply correctly if they
have changed
Change-Id: I1c524452b4245b77467df69a99d29b15cfa6f451
---
.werks/5451 | 11 +++++++++++
checks/logwatch | 4 +---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.werks/5451 b/.werks/5451
new file mode 100644
index 0000000..544e111
--- /dev/null
+++ b/.werks/5451
@@ -0,0 +1,11 @@
+Title: logwatch: Fixed reclassifying mechanism: Patterns did not apply correctly if they
have changed
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i2
+Date: 1512379327
+
+
diff --git a/checks/logwatch b/checks/logwatch
index e92d711..93c485b 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -607,10 +607,8 @@ def check_logwatch_generic(item, params, loglines, found,
groups=False):
except Exception, e:
raise MKGeneralException("User %s cannot open file for writing: %s" %
(logwatch_username(), e))
- pattern_hash = hash(tuple(patterns))
-
+ pattern_hash = hash(repr(patterns))
net_lines = 0
-
# parse cached log lines
if log_exists:
# new format contains hash of patterns on the first line so we only reclassify if
they