extra_hosts and redis_input for logstash

This commit is contained in:
m0duspwnens
2021-12-14 18:49:30 -05:00
parent 4da017d61c
commit 55b74abcc5
3 changed files with 27 additions and 11 deletions

View File

@@ -1,13 +1,12 @@
{%- if grains.role in ['so-heavynode'] %}
{%- set HOST = salt['grains.get']('host') %}
{%- else %}
{%- set HOST = salt['grains.get']('master') %}
{%- endif %}
{%- 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) %}
{%- from 'logstash/map.jinja' import EXTRA_HOSTS with context %}
{%- for host in EXTRA_HOSTS.keys %}
input {
redis {
host => '{{ HOST }}'
host => '{{ host }}'
port => 9696
ssl => true
data_type => 'list'
@@ -17,3 +16,4 @@ input {
batch_count => {{ BATCH }}
}
}
{%- endfor %}