diff --git a/salt/logstash/enabled.sls b/salt/logstash/enabled.sls index c76f81d21..c4d223348 100644 --- a/salt/logstash/enabled.sls +++ b/salt/logstash/enabled.sls @@ -33,18 +33,23 @@ so-logstash: - sobridge: - ipv4_address: {{ DOCKER.containers['so-logstash'].ip }} - user: logstash - - extra_hosts: {{ REDIS_NODES }} + - extra_hosts: + {% for node in REDIS_NODES %} + {% for hostname, ip in node.items() %} + - {{hostname}}:{{ip}} + {% endfor %} + {% endfor %} {% if DOCKER.containers['so-logstash'].extra_hosts %} - {% for XTRAHOST in DOCKER.containers['so-logstash'].extra_hosts %} + {% for XTRAHOST in DOCKER.containers['so-logstash'].extra_hosts %} - {{ XTRAHOST }} - {% endfor %} + {% endfor %} {% endif %} - environment: - LS_JAVA_OPTS=-Xms{{ lsheap }} -Xmx{{ lsheap }} {% if DOCKER.containers['so-logstash'].extra_env %} - {% for XTRAENV in DOCKER.containers['so-logstash'].extra_env %} + {% for XTRAENV in DOCKER.containers['so-logstash'].extra_env %} - {{ XTRAENV }} - {% endfor %} + {% endfor %} {% endif %} - port_bindings: {% for BINDING in DOCKER.containers['so-logstash'].port_bindings %} diff --git a/salt/logstash/pipelines/config/so/9805_output_elastic_agent.conf.jinja b/salt/logstash/pipelines/config/so/9805_output_elastic_agent.conf.jinja index f7671e2b7..3a86cd8be 100644 --- a/salt/logstash/pipelines/config/so/9805_output_elastic_agent.conf.jinja +++ b/salt/logstash/pipelines/config/so/9805_output_elastic_agent.conf.jinja @@ -3,7 +3,7 @@ output { if [metadata][pipeline] { if [metadata][_id] { elasticsearch { - hosts => "{{ GLOBALS.manager }}" + hosts => "{{ GLOBALS.hostname }}" ecs_compatibility => v8 data_stream => true user => "{{ ES_USER }}" @@ -17,7 +17,7 @@ output { } else { elasticsearch { - hosts => "{{ GLOBALS.manager }}" + hosts => "{{ GLOBALS.hostname }}" ecs_compatibility => v8 data_stream => true user => "{{ ES_USER }}" @@ -30,7 +30,7 @@ output { } else { elasticsearch { - hosts => "{{ GLOBALS.manager }}" + hosts => "{{ GLOBALS.hostname }}" ecs_compatibility => v8 data_stream => true user => "{{ ES_USER }}"