diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index bdb40895ca4..5b1cc138d1b 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -64,6 +64,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di *Affecting all Beats* +- Enable flush timeout by default. {pull}5150[5150] - Add @metadata.version to events send to Logstash. {pull}5166[5166] *Auditbeat* diff --git a/auditbeat/auditbeat.reference.yml b/auditbeat/auditbeat.reference.yml index 2e3a127379c..8814d426b04 100644 --- a/auditbeat/auditbeat.reference.yml +++ b/auditbeat/auditbeat.reference.yml @@ -101,11 +101,11 @@ auditbeat.modules: # before providing a batch of events to the outputs. # A value of 0 (the default) ensures events are immediately available # to be sent to the outputs. - #flush.min_events: 0 + #flush.min_events: 2048 # 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: 0s + #flush.timeout: 1s # Sets the maximum number of CPUs that can be executing simultaneously. The # default is the number of logical CPUs available in the system. diff --git a/auditbeat/tests/system/config/auditbeat.yml.j2 b/auditbeat/tests/system/config/auditbeat.yml.j2 index 21911d7d039..0cdbf5bbf84 100644 --- a/auditbeat/tests/system/config/auditbeat.yml.j2 +++ b/auditbeat/tests/system/config/auditbeat.yml.j2 @@ -17,6 +17,11 @@ auditbeat.modules: {% endif -%} {%- endfor %} +queue.mem: + events: 4096 + flush.min_events: 8 + flush.timeout: 0.1s + output.file: path: '{{ output_file_path|default(beat.working_dir + "/output") }}' filename: {{ output_file_filename|default("auditbeat") }} diff --git a/filebeat/filebeat.reference.yml b/filebeat/filebeat.reference.yml index 32b58ac3960..85a2cf66698 100644 --- a/filebeat/filebeat.reference.yml +++ b/filebeat/filebeat.reference.yml @@ -492,11 +492,11 @@ filebeat.prospectors: # before providing a batch of events to the outputs. # A value of 0 (the default) ensures events are immediately available # to be sent to the outputs. - #flush.min_events: 0 + #flush.min_events: 2048 # 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: 0s + #flush.timeout: 1s # Sets the maximum number of CPUs that can be executing simultaneously. The # default is the number of logical CPUs available in the system. diff --git a/filebeat/tests/system/config/filebeat.yml.j2 b/filebeat/tests/system/config/filebeat.yml.j2 index a41e1db935f..9a7330b35a9 100644 --- a/filebeat/tests/system/config/filebeat.yml.j2 +++ b/filebeat/tests/system/config/filebeat.yml.j2 @@ -156,6 +156,13 @@ processors: {%- endif %} +#================================ Queue ===================================== + +queue.mem: + events: 4096 + flush.min_events: 8 + flush.timeout: 0.1s + #================================ Outputs ===================================== # Configure what outputs to use when sending the data collected by the beat. diff --git a/heartbeat/heartbeat.reference.yml b/heartbeat/heartbeat.reference.yml index e17e962120e..87ce0d831ee 100644 --- a/heartbeat/heartbeat.reference.yml +++ b/heartbeat/heartbeat.reference.yml @@ -250,11 +250,11 @@ heartbeat.scheduler: # before providing a batch of events to the outputs. # A value of 0 (the default) ensures events are immediately available # to be sent to the outputs. - #flush.min_events: 0 + #flush.min_events: 2048 # 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: 0s + #flush.timeout: 1s # Sets the maximum number of CPUs that can be executing simultaneously. The # default is the number of logical CPUs available in the system. diff --git a/heartbeat/tests/system/config/heartbeat.yml.j2 b/heartbeat/tests/system/config/heartbeat.yml.j2 index 664715c60b6..42407d56841 100644 --- a/heartbeat/tests/system/config/heartbeat.yml.j2 +++ b/heartbeat/tests/system/config/heartbeat.yml.j2 @@ -56,6 +56,15 @@ fields: {% endfor -%} {% endif %} +#================================ Queue ===================================== + +queue.mem: + events: 4096 + flush.min_events: 8 + flush.timeout: 0.1s + +#================================ Outputs ===================================== + output.file: path: {{ output_file_path|default(beat.working_dir + "/output") }} filename: "{{ output_file_filename|default("heartbeat") }}" diff --git a/libbeat/_meta/config.reference.yml b/libbeat/_meta/config.reference.yml index 28bf014bbb4..628030c5036 100644 --- a/libbeat/_meta/config.reference.yml +++ b/libbeat/_meta/config.reference.yml @@ -36,11 +36,11 @@ # before providing a batch of events to the outputs. # A value of 0 (the default) ensures events are immediately available # to be sent to the outputs. - #flush.min_events: 0 + #flush.min_events: 2048 # 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: 0s + #flush.timeout: 1s # Sets the maximum number of CPUs that can be executing simultaneously. The # default is the number of logical CPUs available in the system. diff --git a/libbeat/publisher/queue/memqueue/config.go b/libbeat/publisher/queue/memqueue/config.go index ef843484a37..54da7aeb8f1 100644 --- a/libbeat/publisher/queue/memqueue/config.go +++ b/libbeat/publisher/queue/memqueue/config.go @@ -13,8 +13,8 @@ type config struct { var defaultConfig = config{ Events: 4 * 1024, - FlushMinEvents: 0, - FlushTimeout: 0, + FlushMinEvents: 2 * 1024, + FlushTimeout: 1 * time.Second, } func (c *config) Validate() error { diff --git a/libbeat/tests/system/config/mockbeat.yml.j2 b/libbeat/tests/system/config/mockbeat.yml.j2 index 03909dfb3ac..a0415a953d2 100644 --- a/libbeat/tests/system/config/mockbeat.yml.j2 +++ b/libbeat/tests/system/config/mockbeat.yml.j2 @@ -18,6 +18,12 @@ tags: [ {%- endfor -%} {%- endif -%}] +#================================ Queue ===================================== + +queue.mem: + events: 4096 + flush.min_events: 8 + flush.timeout: 0.1s ############################# Output ############################################ diff --git a/metricbeat/metricbeat.reference.yml b/metricbeat/metricbeat.reference.yml index 2d93ab2855a..d1ca14e7761 100644 --- a/metricbeat/metricbeat.reference.yml +++ b/metricbeat/metricbeat.reference.yml @@ -456,11 +456,11 @@ metricbeat.modules: # before providing a batch of events to the outputs. # A value of 0 (the default) ensures events are immediately available # to be sent to the outputs. - #flush.min_events: 0 + #flush.min_events: 2048 # 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: 0s + #flush.timeout: 1s # Sets the maximum number of CPUs that can be executing simultaneously. The # default is the number of logical CPUs available in the system. diff --git a/metricbeat/tests/system/config/metricbeat.yml.j2 b/metricbeat/tests/system/config/metricbeat.yml.j2 index 519bf3ef1fe..2c02f4b78c9 100644 --- a/metricbeat/tests/system/config/metricbeat.yml.j2 +++ b/metricbeat/tests/system/config/metricbeat.yml.j2 @@ -139,6 +139,13 @@ processors: {%- endif %} +#================================ Queue ===================================== + +queue.mem: + events: 4096 + flush.min_events: 8 + flush.timeout: 0.1s + #================================ Outputs ===================================== # Configure what outputs to use when sending the data collected by the beat. diff --git a/packetbeat/packetbeat.reference.yml b/packetbeat/packetbeat.reference.yml index 0beec09d542..3a57e52e9c1 100644 --- a/packetbeat/packetbeat.reference.yml +++ b/packetbeat/packetbeat.reference.yml @@ -488,11 +488,11 @@ packetbeat.protocols: # before providing a batch of events to the outputs. # A value of 0 (the default) ensures events are immediately available # to be sent to the outputs. - #flush.min_events: 0 + #flush.min_events: 2048 # 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: 0s + #flush.timeout: 1s # Sets the maximum number of CPUs that can be executing simultaneously. The # default is the number of logical CPUs available in the system. diff --git a/packetbeat/tests/system/config/packetbeat.yml.j2 b/packetbeat/tests/system/config/packetbeat.yml.j2 index 354958c38d3..2523d2ea69f 100644 --- a/packetbeat/tests/system/config/packetbeat.yml.j2 +++ b/packetbeat/tests/system/config/packetbeat.yml.j2 @@ -193,6 +193,13 @@ processors: {%- endif %} +#================================ Queue ===================================== + +queue.mem: + events: 4096 + flush.min_events: 8 + flush.timeout: 0.1s + #================================ Outputs ===================================== # Configure what outputs to use when sending the data collected by the beat. diff --git a/winlogbeat/tests/system/config/winlogbeat.yml.j2 b/winlogbeat/tests/system/config/winlogbeat.yml.j2 index f221376cbff..8ca238a13ba 100644 --- a/winlogbeat/tests/system/config/winlogbeat.yml.j2 +++ b/winlogbeat/tests/system/config/winlogbeat.yml.j2 @@ -77,6 +77,13 @@ fields: {% endfor -%} {% endif %} +#================================ Queue ===================================== + +queue.mem: + events: 4096 + flush.min_events: 8 + flush.timeout: 0.1s + #================================ Outputs ===================================== # Configure what outputs to use when sending the data collected by the beat. diff --git a/winlogbeat/winlogbeat.reference.yml b/winlogbeat/winlogbeat.reference.yml index 4454e8b44d7..e34085e7de1 100644 --- a/winlogbeat/winlogbeat.reference.yml +++ b/winlogbeat/winlogbeat.reference.yml @@ -65,11 +65,11 @@ winlogbeat.event_logs: # before providing a batch of events to the outputs. # A value of 0 (the default) ensures events are immediately available # to be sent to the outputs. - #flush.min_events: 0 + #flush.min_events: 2048 # 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: 0s + #flush.timeout: 1s # Sets the maximum number of CPUs that can be executing simultaneously. The # default is the number of logical CPUs available in the system.