diff --git a/elk_metrics_7x/roles/elastic_journalbeat/defaults/main.yml b/elk_metrics_7x/roles/elastic_journalbeat/defaults/main.yml index f6e0ba4f..e2db9984 100644 --- a/elk_metrics_7x/roles/elastic_journalbeat/defaults/main.yml +++ b/elk_metrics_7x/roles/elastic_journalbeat/defaults/main.yml @@ -32,3 +32,14 @@ processors: {} # Logging level # Available log levels are error, warning, info, debug journalbeat_log_level: "{{ elastic_beat_log_level | default('info') }}" + +## Journalbeat event queue configuration +# Determines conditions under which the journalbeat event queue is flushed to logstash +# Max # of events the queue can buffer +journalbeat_queue_flush_max_events: 4096 + +# Min # of events before queue is flushed +journalbeat_queue_flush_min_events: 2048 + +# Max time before queue is flushed (even if queue_min_events is not reached) +journalbeat_queue_flush_timeout: 1s diff --git a/elk_metrics_7x/roles/elastic_journalbeat/templates/journalbeat.yml.j2 b/elk_metrics_7x/roles/elastic_journalbeat/templates/journalbeat.yml.j2 index 7776a49c..897988b4 100644 --- a/elk_metrics_7x/roles/elastic_journalbeat/templates/journalbeat.yml.j2 +++ b/elk_metrics_7x/roles/elastic_journalbeat/templates/journalbeat.yml.j2 @@ -77,25 +77,25 @@ tags: #fields_under_root: false # Internal queue configuration for buffering events to be published. -#queue: +queue: # Queue type by name (default 'mem') # The memory queue will present all available events (up to the outputs # bulk_max_size) to the output, the moment the output is ready to server # another batch of events. - #mem: + mem: # Max number of events the queue can buffer. - #events: 4096 + events: {{ journalbeat_queue_flush_max_events }} # Hints the minimum number of events stored in the queue, # before providing a batch of events to the outputs. # The default value is set to 2048. # A value of 0 ensures events are immediately available # to be sent to the outputs. - #flush.min_events: 2048 + flush.min_events: {{ journalbeat_queue_flush_min_events }} # Maximum duration after which events are available to the outputs, # if the number of events stored in the queue is < min_flush_events. - #flush.timeout: 1s + flush.timeout: {{ journalbeat_queue_flush_timeout }} # The spool queue will store events in a local spool file, before # forwarding the events to the outputs.