From 63ad661e6cffbe10f9371fddbd65d3c351c09a1e Mon Sep 17 00:00:00 2001 From: pengln Date: Mon, 6 Dec 2021 16:41:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmonitor=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E5=92=8C=E5=AF=86=E7=A0=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playbooks/roles/filebeat/templates/filebeat_monitor.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbooks/roles/filebeat/templates/filebeat_monitor.yaml b/playbooks/roles/filebeat/templates/filebeat_monitor.yaml index b686d2e..c78f277 100644 --- a/playbooks/roles/filebeat/templates/filebeat_monitor.yaml +++ b/playbooks/roles/filebeat/templates/filebeat_monitor.yaml @@ -2,6 +2,10 @@ project_id: {{ instance_name }} sublog: {{ log_type }} elastic_hosts: {{ filebeat_logs[log_type]['es_hosts'] }} elastic_indice_name: {{ filebeat_logs[log_type]['index_prefix'] }}-{{ instance_name }}-* +{%- if filebeat_logs[log_type]['es_user'] and filebeat_logs[log_type]['es_passwd'] -%} +elastic_username: {{ filebeat_logs[log_type]['es_user'] }} +elastic_password: {{ filebeat_logs[log_type]['es_passwd'] }} +{%- endif -%} elastic_search_lifecycle: {{ filebeat_monitor_lifecycle | default(30) }} http_unix_sock: {{ filebeat_monitor_sock | default('./filebeat_monitor.sock') }} prometheus_push_gateway_url: {{ filebeat_monitor_push_gateway | default('') }}