From 45ff4f4930c669e76e056fc348af321a7c73f8d9 Mon Sep 17 00:00:00 2001 From: pengln Date: Wed, 29 Dec 2021 18:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20multiline=20=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playbooks/roles/filebeat/templates/filebeat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/filebeat/templates/filebeat.yml b/playbooks/roles/filebeat/templates/filebeat.yml index fa5e4a3..42482e0 100644 --- a/playbooks/roles/filebeat/templates/filebeat.yml +++ b/playbooks/roles/filebeat/templates/filebeat.yml @@ -10,7 +10,7 @@ filebeat.inputs: {% if "exclude_files" in logs[log_type] -%} exclude_files: {{ logs[log_type]['exclude_files'] }} {% endif -%} - {% if logs[log_type]['multiline'] -%} + {% if 'multiline' in logs[log_type] and logs[log_type]['multiline'] -%} multiline.type: pattern multiline.pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}' multiline.negate: true -- 2.40.1