Module: check_mk
Branch: master
Commit: 810e9ec0995de261a2e1d39cdcd32bb153f483b0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=810e9ec0995de2…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Wed Dec 20 15:24:41 2017 +0100
5484 FIX logwatch.ec: Fix exception when reclassify patterns are specified
Change-Id: Id6a2cc807e6041b2f8af7047fd6bb7ad3bed9054
---
.werks/5484 | 11 +++++++++++
checks/logwatch | 4 ++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/5484 b/.werks/5484
new file mode 100644
index 0000000..d6dc1d4
--- /dev/null
+++ b/.werks/5484
@@ -0,0 +1,11 @@
+Title: logwatch.ec: Fix exception when reclassify patterns are specified
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i3
+Date: 1513779501
+
+
diff --git a/checks/logwatch b/checks/logwatch
index 93c485b..088b324 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -848,11 +848,11 @@ def check_logwatch_ec(item, params, info):
logfile_reclassify_settings = {}
def add_reclassify_settings(settings):
if isinstance(settings, dict):
- logfile_reclassify_settings["reclassify_patterns"].extend(x[:2] for
x in settings.get("reclassify_patterns"))
+ logfile_reclassify_settings["reclassify_patterns"].extend(x for x
in settings.get("reclassify_patterns"))
if "reclassify_states" in settings:
logfile_reclassify_settings["reclassify_states"] =
settings["reclassify_states"]
else: # legacy configuration
- logfile_reclassify_settings["reclassify_patterns"].extend(x[:2] for
x in settings)
+ logfile_reclassify_settings["reclassify_patterns"].extend(x for x
in settings)
for logfile, lines in logs.items():
logfile_reclassify_settings["reclassify_patterns"] = []