修复 filebeat 多行日志推送Grok失败的问题 #56

Merged
pengln merged 1 commits from pengln/filebeat:master into master 2021-12-29 18:09:59 +08:00
2 changed files with 8 additions and 0 deletions
Showing only changes of commit 156f4012e3 - Show all commits

View File

@ -34,6 +34,7 @@ filebeat_logs:
index_prefix: "mgr"
template_name: "mgr-cp"
template_pattern: "mgr-*"
multiline: true
sublog: cp
filebeat_older_dir: "/data/opt/filebeat/{{ instance_name }}"
filebeat_older_data_dir: data2

View File

@ -10,6 +10,13 @@ filebeat.inputs:
{% if "exclude_files" in logs[log_type] -%}
exclude_files: {{ logs[log_type]['exclude_files'] }}
{% endif -%}
{% if logs[log_type]['multiline'] -%}
multiline.type: pattern
multiline.pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
multiline.negate: true
multiline.match: after
multiline.skip_newline: true
{% endif -%}
harvester_buffer_size: 2048
ignore_older: {{ filebeat_older }}
tail_files: {{ filebeat_tail_files | string | lower }}