From fc73dc3ef66fb74d6f35e2caa92bf485ab3a726d Mon Sep 17 00:00:00 2001 From: pengln Date: Tue, 9 Nov 2021 11:25:10 +0800 Subject: [PATCH] =?UTF-8?q?#1001590=20=E5=A2=9E=E5=8A=A0=E9=92=88=E5=AF=B9?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=BA=94=E7=94=A8=E6=97=A5=E5=BF=97=E7=9A=84?= =?UTF-8?q?=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/filebeat-gateway-nginx-template.yml | 2 +- .../filebeat/templates/filebeat-manager-template.yml | 2 +- playbooks/roles/filebeat/vars/main.yml | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/playbooks/roles/filebeat/templates/filebeat-gateway-nginx-template.yml b/playbooks/roles/filebeat/templates/filebeat-gateway-nginx-template.yml index 32cd8cd..fdc3417 100644 --- a/playbooks/roles/filebeat/templates/filebeat-gateway-nginx-template.yml +++ b/playbooks/roles/filebeat/templates/filebeat-gateway-nginx-template.yml @@ -1,7 +1,7 @@ filebeat.registry.path: {{ work_path }}/data/registry/gw-nginx-{{ instance_name }} filebeat.inputs: -{% for log in logs %} +{% for log in gwlogs %} - type: log paths: - "/data/log/nginx/access_{{ log }}.log" diff --git a/playbooks/roles/filebeat/templates/filebeat-manager-template.yml b/playbooks/roles/filebeat/templates/filebeat-manager-template.yml index 9504320..3a53912 100644 --- a/playbooks/roles/filebeat/templates/filebeat-manager-template.yml +++ b/playbooks/roles/filebeat/templates/filebeat-manager-template.yml @@ -1,7 +1,7 @@ filebeat.registry.path: {{ work_path }}/data/registry/mgr-cp-{{ instance_name }} filebeat.inputs: -{% for log in logs %} +{% for log in mgrlogs %} - type: log paths: - {{ log }} diff --git a/playbooks/roles/filebeat/vars/main.yml b/playbooks/roles/filebeat/vars/main.yml index 78bbed0..5959b0c 100644 --- a/playbooks/roles/filebeat/vars/main.yml +++ b/playbooks/roles/filebeat/vars/main.yml @@ -2,7 +2,17 @@ # vars file for filebeat 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 }}" -logs: +gwlogs: + - "api" + - "cl*" + - "doc" + - "download" + - "gw*" + - "cp*" + - "pay" + - "static" + - "81" +mgrlogs: - "/data/game/htdocs/center/manager/storage/cp/logs/*.log" config_files: - "gateway-nginx" -- 2.40.1