diff --git a/playbooks/roles/filebeat/defaults/main.yml b/playbooks/roles/filebeat/defaults/main.yml index 17ef4d8..4a0d9d3 100644 --- a/playbooks/roles/filebeat/defaults/main.yml +++ b/playbooks/roles/filebeat/defaults/main.yml @@ -30,7 +30,7 @@ filebeat_logs: filebeat_older_dir: "/data/opt/filebeat/{{ instance_name }}" filebeat_older_data_dir: data #[1002041] 只给quick日志和gw日志开启elastic_delays检查 - elastic_delays_metric_enabled: True + elastic_delays_metric_enabled: yes manager: paths: - "/data/game/htdocs/center/manager/storage/cp/logs/*.log" @@ -58,4 +58,4 @@ filebeat_logs: filebeat_older_dir: "/data/opt/filebeat/quick" filebeat_older_data_dir: data #[1002041] 只给quick日志和gw日志开启elastic_delays检查 - elastic_delays_metric_enabled: True \ No newline at end of file + elastic_delays_metric_enabled: yes \ No newline at end of file diff --git a/playbooks/roles/filebeat/templates/filebeat.yml b/playbooks/roles/filebeat/templates/filebeat.yml index ff1b972..2aaf273 100644 --- a/playbooks/roles/filebeat/templates/filebeat.yml +++ b/playbooks/roles/filebeat/templates/filebeat.yml @@ -40,8 +40,9 @@ filebeat.config.modules: reload.enabled: false # ======================= Elasticsearch template setting ======================= -#[#1002043] 通过强制filebeat注册ilm策略方式,修订意外丢失的ilm策略 -setup.ilm.enabled: true +#[#1002043] 通过强制filebeat注册ilm策略方式,修订意外丢失的ilm策略。 +#如果filebaet_ilm_enabled被设置为false则禁止ilm,这是为了兼容华为云的ES +setup.ilm.enabled: {{ logs[log_type]['filebaet_ilm_enabled'] | default true }} setup.ilm.policy_name: "{{ logs[log_type]['setup_ilm_policy_name'] | default('gw-nginx-ug10') }}" setup.ilm.check_exists: true