Add batch to output

This commit is contained in:
Mike Reeves
2020-07-01 14:38:51 -04:00
committed by GitHub
parent 549fd93cba
commit 70e4ce3e98

View File

@@ -1,26 +1,14 @@
{%- if salt['grains.get']('role') == 'so-master' %}
{% set master = salt['pillar.get']('static:masterip', '') %}
{%- set nodetype = 'master' %}
{% elif grains.role == 'so-heavynode' %}
{% set master = salt['pillar.get']('node:mainip', '') %}
{%- set nodetype = salt['pillar.get']('node:node_type', 'search') %}
{%- else %}
{%- set nodetype = salt['pillar.get']('node:node_type', 'storage') %}
{% set master = salt['pillar.get']('static:masterip', '') %}
{%- endif %}
{% set MASTER = salt['pillar.get']('static:masterip', '') %}
{% set BATCH = salt['pillar.get']('logstash:batch_size', 500) %}
output {
redis {
host => '{{ master }}'
host => '{{ MASTER }}'
data_type => 'list'
{%- if nodetype == 'parser' %}
key => 'logstash:parsed'
{%- else %}
key => 'logstash:unparsed'
{%- endif %}
congestion_interval => 1
congestion_threshold => 50000000
# batch_events => 500
batch ==> True
batch_events => {{ BATCH }}
}
}