forked from ansible-collection/filebeat
Merge pull request '增加排除文件的配置项' (#35) from pengln/filebeat:master into master
Reviewed-on: https://app.huanyuantech.com:10301/gitea/ansible-collection/filebeat/pulls/35
This commit is contained in:
commit
3aa63c5768
|
@ -22,6 +22,7 @@ filebeat_logs:
|
||||||
index_prefix: "gw-nginx"
|
index_prefix: "gw-nginx"
|
||||||
template_name: "gw-nginx-ug10cn"
|
template_name: "gw-nginx-ug10cn"
|
||||||
template_pattern: "gw-nginx-*"
|
template_pattern: "gw-nginx-*"
|
||||||
|
exclude_files: '_81\.log$'
|
||||||
dissect_tokenizers:
|
dissect_tokenizers:
|
||||||
- tokenizer: "/%{}/%{}/%{}/%{}_%{sublog}.log"
|
- tokenizer: "/%{}/%{}/%{}/%{}_%{sublog}.log"
|
||||||
field_name: "log.file.path"
|
field_name: "log.file.path"
|
||||||
|
|
|
@ -9,6 +9,9 @@ filebeat.config.inputs:
|
||||||
filebeat.inputs:
|
filebeat.inputs:
|
||||||
- type: log
|
- type: log
|
||||||
paths: {{ logs[log_type]['paths'] }}
|
paths: {{ logs[log_type]['paths'] }}
|
||||||
|
{% if logs[log_type]['exclude_files'] -%}
|
||||||
|
exclude_files: {{ logs[log_type]['exclude_files'] }}
|
||||||
|
{% endif -%}
|
||||||
harvester_buffer_size: 40960
|
harvester_buffer_size: 40960
|
||||||
ignore_older: {{ filebeat_older }}
|
ignore_older: {{ filebeat_older }}
|
||||||
tail_files: {{ filebeat_tail_files | string | lower }}
|
tail_files: {{ filebeat_tail_files | string | lower }}
|
||||||
|
|
Loading…
Reference in New Issue