fix redis input

This commit is contained in:
m0duspwnens
2021-12-14 23:42:37 -05:00
parent 15b8d80b71
commit 0c6aba16ec

View File

@@ -1,19 +1,20 @@
{%- set THREADS = salt['pillar.get']('logstash_settings:ls_input_threads', '') %} {% set THREADS = salt['pillar.get']('logstash_settings:ls_input_threads', '') -%}
{%- set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) %} {% 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 index in range(REDIS_NODES|length) -%}
{% for host in REDIS_NODES[index] -%}
{%- for host_ip in EXTRA_HOSTS %}
input { input {
redis { redis {
host => '{{ host_ip.split(':')[0] }}' host => '{{ host }}'
port => 9696 port => 9696
ssl => true ssl => true
data_type => 'list' data_type => 'list'
key => 'logstash:unparsed' key => 'logstash:unparsed'
type => 'redis-input' type => 'redis-input'
threads => {{ THREADS }} threads => {{ THREADS }}
batch_count => {{ BATCH }} batch_count => {{ BATCH }}
} }
} }
{%- endfor %} {% endfor %}
{% endfor -%}