diff --git a/salt/logstash/pipelines/config/so/0900_input_redis.conf.jinja b/salt/logstash/pipelines/config/so/0900_input_redis.conf.jinja index fa43ff5a4..2d7a2d4fe 100644 --- a/salt/logstash/pipelines/config/so/0900_input_redis.conf.jinja +++ b/salt/logstash/pipelines/config/so/0900_input_redis.conf.jinja @@ -1,19 +1,20 @@ -{%- set THREADS = salt['pillar.get']('logstash_settings:ls_input_threads', '') %} -{%- set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) %} +{% set THREADS = salt['pillar.get']('logstash_settings:ls_input_threads', '') -%} +{% set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) -%} +{% from 'logstash/map.jinja' import REDIS_NODES with context -%} -{%- from 'logstash/map.jinja' import EXTRA_HOSTS with context %} - -{%- for host_ip in EXTRA_HOSTS %} +{% for index in range(REDIS_NODES|length) -%} +{% for host in REDIS_NODES[index] -%} input { - redis { - host => '{{ host_ip.split(':')[0] }}' - port => 9696 - ssl => true - data_type => 'list' - key => 'logstash:unparsed' - type => 'redis-input' - threads => {{ THREADS }} - batch_count => {{ BATCH }} - } + redis { + host => '{{ host }}' + port => 9696 + ssl => true + data_type => 'list' + key => 'logstash:unparsed' + type => 'redis-input' + threads => {{ THREADS }} + batch_count => {{ BATCH }} + } } -{%- endfor %} +{% endfor %} +{% endfor -%}