Merge pull request 'master' (#15) from pengln/filebeat:master into master

Reviewed-on: https://app.amonstack.com:10301/gitea/ansible-collection/filebeat/pulls/15
This commit is contained in:
pengln 2021-11-15 19:21:06 +08:00
commit 4bc683c26c
3 changed files with 27 additions and 13 deletions

View File

@ -1,18 +1,24 @@
path.data: {{ work_path }}/data
filebeat.registry.path: {{ work_path }}/data/registry/gw-nginx-{{ instance_name }}
queue.mem:
events: 512
flush.min_events: 128
flush.timeout: 5s
filebeat.inputs:
{% for log in gwlogs %}
- type: log
paths:
- "/data/log/nginx/access_{{ log }}.log"
- "/data/log/nginx/error_{{ log }}.log"
- "{{ log }}"
fields:
source: {{ log | regex_replace('\*') }}
harvester_buffer_size: 1638400
tail_files: {{ tail_files | default(true) | string | lower }}
{% endfor %}
max_procs: {{ max_procs | default(2) }}
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
@ -43,7 +49,7 @@ output.elasticsearch:
username: {{ es_user }}
password: {{ es_passwd }}
bulk_max_size: 1500
worker: 3
worker: 1
# ================================= Processors =================================

View File

@ -1,6 +1,11 @@
path.data: {{ work_path }}/data2
filebeat.registry.path: {{ work_path }}/data2/registry/mgr-cp-{{ instance_name }}
queue.mem:
events: 512
flush.min_events: 128
flush.timeout: 5s
filebeat.inputs:
{% for log in mgrlogs %}
- type: log
@ -14,8 +19,11 @@ filebeat.inputs:
fields:
source: cp
harvester_buffer_size: 1638400
tail_files: {{ tail_files | default(true) | string | lower }}
{% endfor %}
max_procs: {{ max_procs | default(2) }}
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml

View File

@ -3,15 +3,15 @@
filebeat_download_url: "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.10.1-linux-x86_64.tar.gz"
work_path: "/data/opt/filebeat/{{ instance_name }}"
gwlogs:
- "api"
- "cl*"
- "doc"
- "download"
- "gw*"
- "cp*"
- "pay"
- "static"
- "81"
- "/data/log/nginx/*_api.log"
- "/data/log/nginx/*_cl*.log"
- "/data/log/nginx/*_doc.log"
- "/data/log/nginx/*_download.log"
- "/data/log/nginx/*_gw*.log"
- "/data/log/nginx/*_cp*.log"
- "/data/log/nginx/*_pay.log"
- "/data/log/nginx/*_static.log"
- "/data/log/nginx/*_81.log"
mgrlogs:
- "/data/game/htdocs/center/manager/storage/cp/logs/*.log"
config_files: