mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-11-09 22:20:00 +01:00
Add logstash:pipeline_settings carrying the 27 pipeline-scoped settings Logstash 9.3.7 accepts, annotated individually per pipeline and rendered into pipelines.yml. A blank setting inherits from logstash.yml. Restart logstash when pipelines.yml changes, and add the missing managerhype annotation. Fixes #15090
18 lines
832 B
Django/Jinja
18 lines
832 B
Django/Jinja
{%- from 'logstash/map.jinja' import LOGSTASH_MERGED %}
|
|
{%- set PIPELINE_SETTINGS = LOGSTASH_MERGED.get('pipeline_settings', {}) %}
|
|
{%- for assigned_pipeline in ASSIGNED_PIPELINES %}
|
|
- pipeline.id: {{ assigned_pipeline }}
|
|
path.config: "/usr/share/logstash/pipelines/{{ assigned_pipeline }}/"
|
|
{%- set extra = PIPELINE_SETTINGS.get(assigned_pipeline, {}) %}
|
|
{%- if extra is mapping %}
|
|
{#- values are emitted unquoted so yaml re-infers the type logstash expects:
|
|
4 as an integer, false as a boolean, 1024mb and auto as strings #}
|
|
{%- for key, value in extra | dictsort %}
|
|
{%- set rendered = key | replace('_x_', '.') %}
|
|
{%- if value not in ['', None] and rendered not in ['pipeline.id', 'path.config'] %}
|
|
{{ rendered }}: {{ value }}
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
{% endfor -%}
|