diff --git a/elk_metrics_6x/templates/_include_log_stash_output.yml.j2 b/elk_metrics_6x/templates/_include_log_stash_output.yml.j2 index 295df39b..322ac439 100644 --- a/elk_metrics_6x/templates/_include_log_stash_output.yml.j2 +++ b/elk_metrics_6x/templates/_include_log_stash_output.yml.j2 @@ -10,10 +10,10 @@ output.logstash: hosts: {{ IP_ARR | to_json }} # Number of workers per Logstash host. - #worker: 1 + worker: 1 # Set gzip compression level. - #compression_level: 3 + compression_level: 3 # Optional maximum time to live for a connection to Logstash, after which the # connection will be re-established. A value of `0s` (the default) will @@ -27,16 +27,18 @@ output.logstash: # Number of batches to be sent asynchronously to logstash while processing # new batches. - #pipelining: 2 + pipelining: 2 # If enabled only a subset of events in a batch of events is transferred per # transaction. The number of events to be sent increases up to `bulk_max_size` # if no error is encountered. - #slow_start: false + slow_start: true - # Optional index name. The default index name is set to heartbeat +{% if _named_index is defined %} + # Optional index name. The default index name is set to {{ named_index }} # in all lowercase. - #index: 'heartbeat' + index: '{{ named_index }}' +{% endif %} # SOCKS5 proxy server URL #proxy_url: socks5://user:password@socks5-server:2233 diff --git a/elk_metrics_6x/templates/journalbeat.yml.j2 b/elk_metrics_6x/templates/journalbeat.yml.j2 index 2164acaf..df73ac2c 100644 --- a/elk_metrics_6x/templates/journalbeat.yml.j2 +++ b/elk_metrics_6x/templates/journalbeat.yml.j2 @@ -280,7 +280,9 @@ name: journalbeat #----------------------------- Logstash output --------------------------------- +{% with _named_index="journalbeat" %} {% include 'templates/_include_log_stash_output.yml.j2' %} +{% endwith %} #------------------------------- Kafka output ---------------------------------- #output.kafka: