diff --git a/salt/filebeat/etc/filebeat.yml b/salt/filebeat/etc/filebeat.yml index f29205743..e11dabb8b 100644 --- a/salt/filebeat/etc/filebeat.yml +++ b/salt/filebeat/etc/filebeat.yml @@ -323,10 +323,11 @@ output.logstash: # The Logstash hosts hosts: {%- set LOADBALANCE = ['false'] %} +{%- set node_data = salt['pillar.get']('node_data') | dictsort() %} {%- if grains.role not in ['so-heavynode', 'so-import', 'so-helix', 'so-eval'] %} -{%- for node_type, node_details in salt['pillar.get']('node_data') | dictsort() %} +{%- for node_type, node_details in node_data %} {%- if node_type in ['manager', 'managersearch', 'standalone', 'receiver' ] %} -{%- for hostname in node_type.keys() %} +{%- for hostname in node_data[node_type].keys() %} - "{{ hostname }}:5644" #{{ node_details[hostname][ip] }} {%- endfor %} {%- endif %}