Module: check_mk
Branch: master
Commit: c9d9c60ceb0f438e9303721cd56280973457bf8d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c9d9c60ceb0f43…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 16 16:00:35 2013 +0200
mk_logwatch: replace \\0 with complete message
---
agents/plugins/mk_logwatch | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/agents/plugins/mk_logwatch b/agents/plugins/mk_logwatch
index 60163d3..46dce99 100755
--- a/agents/plugins/mk_logwatch
+++ b/agents/plugins/mk_logwatch
@@ -232,9 +232,9 @@ def process_logfile(logfile, patterns):
if replace:
matches = pattern.match(log_line)
replace_count = 1
- new_message = replace
+ new_message = replace.replace('\\0', log_line)
for replacement in matches.groups():
- new_message = new_message.replace('\%d' % replace_count,
replacement)
+ new_message = new_message.replace('\\%d' % replace_count,
replacement)
replace_count += 1
log_line = new_message
break