mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-06-12 13:19:22 +02:00
28 lines
839 B
Django/Jinja
28 lines
839 B
Django/Jinja
{%- from 'logstash/map.jinja' import LOGSTASH_REDIS_NODES, LOGSTASH_MERGED %}
|
|
{%- set REDIS_PASS = salt['pillar.get']('redis:config:requirepass') %}
|
|
|
|
{%- for index in range(LOGSTASH_REDIS_NODES|length) %}
|
|
{%- for host in LOGSTASH_REDIS_NODES[index] %}
|
|
input {
|
|
redis {
|
|
host => '{{ host }}'
|
|
port => 9696
|
|
ssl => true
|
|
data_type => 'list'
|
|
key => 'logstash:unparsed'
|
|
type => 'redis-input'
|
|
threads => {{ THREADS }}
|
|
batch_count => {{ BATCH }}
|
|
password => '{{ REDIS_PASS }}'
|
|
}
|
|
}
|
|
{% endfor %}
|
|
{% endfor -%}
|
|
filter {
|
|
{% if LOGSTASH_MERGED.get('latency_metrics', False) %}
|
|
ruby {
|
|
code => "event.set('[_tmp][logstash_from_redis]', Time.now().utc.iso8601(3));"
|
|
}
|
|
{% endif %}
|
|
}
|