diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index eeb647153405..86b2b1d30f0a 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -19,6 +19,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta1...master[Check the HEAD di - Fail if removed setting output.X.flush_interval is explicitly configured. - Rename the `/usr/bin/beatname.sh` script (e.g. `metricbeat.sh`) to `/usr/bin/beatname`. {pull}4933[4933] - Beat does not start if elasticsearch index pattern was modified but not the template name and pattern. {issue}4769[4769] +- Fail if removed setting output.X.flush_interval is explicitly configured. *Auditbeat* diff --git a/auditbeat/auditbeat.reference.yml b/auditbeat/auditbeat.reference.yml index f802d5493639..176176cf2128 100644 --- a/auditbeat/auditbeat.reference.yml +++ b/auditbeat/auditbeat.reference.yml @@ -237,11 +237,6 @@ output.elasticsearch: # Configure http request timeout before failing an request to Elasticsearch. #timeout: 90 - # The number of seconds to wait for new events between two bulk API index requests. - # If `bulk_max_size` is reached before this interval expires, addition bulk index - # requests are made. - #flush_interval: 1s - # Use SSL settings for HTTPS. Default is true. #ssl.enabled: true @@ -441,9 +436,6 @@ output.elasticsearch: # on error. #required_acks: 1 - # The number of seconds to wait for new events between two producer API calls. - #flush_interval: 1s - # The configurable ClientID used for logging, debugging, and auditing # purposes. The default is "beats". #client_id: beats diff --git a/filebeat/filebeat.reference.yml b/filebeat/filebeat.reference.yml index b0c7ace7c0de..dede09865948 100644 --- a/filebeat/filebeat.reference.yml +++ b/filebeat/filebeat.reference.yml @@ -628,11 +628,6 @@ output.elasticsearch: # Configure http request timeout before failing an request to Elasticsearch. #timeout: 90 - # The number of seconds to wait for new events between two bulk API index requests. - # If `bulk_max_size` is reached before this interval expires, addition bulk index - # requests are made. - #flush_interval: 1s - # Use SSL settings for HTTPS. Default is true. #ssl.enabled: true @@ -832,9 +827,6 @@ output.elasticsearch: # on error. #required_acks: 1 - # The number of seconds to wait for new events between two producer API calls. - #flush_interval: 1s - # The configurable ClientID used for logging, debugging, and auditing # purposes. The default is "beats". #client_id: beats diff --git a/heartbeat/heartbeat.reference.yml b/heartbeat/heartbeat.reference.yml index 8b441970e5e7..aeae9cf0b6ab 100644 --- a/heartbeat/heartbeat.reference.yml +++ b/heartbeat/heartbeat.reference.yml @@ -386,11 +386,6 @@ output.elasticsearch: # Configure http request timeout before failing an request to Elasticsearch. #timeout: 90 - # The number of seconds to wait for new events between two bulk API index requests. - # If `bulk_max_size` is reached before this interval expires, addition bulk index - # requests are made. - #flush_interval: 1s - # Use SSL settings for HTTPS. Default is true. #ssl.enabled: true @@ -590,9 +585,6 @@ output.elasticsearch: # on error. #required_acks: 1 - # The number of seconds to wait for new events between two producer API calls. - #flush_interval: 1s - # The configurable ClientID used for logging, debugging, and auditing # purposes. The default is "beats". #client_id: beats diff --git a/libbeat/_meta/config.reference.yml b/libbeat/_meta/config.reference.yml index 0557b3be5090..a7a5fc4687bd 100644 --- a/libbeat/_meta/config.reference.yml +++ b/libbeat/_meta/config.reference.yml @@ -172,11 +172,6 @@ output.elasticsearch: # Configure http request timeout before failing an request to Elasticsearch. #timeout: 90 - # The number of seconds to wait for new events between two bulk API index requests. - # If `bulk_max_size` is reached before this interval expires, addition bulk index - # requests are made. - #flush_interval: 1s - # Use SSL settings for HTTPS. Default is true. #ssl.enabled: true @@ -376,9 +371,6 @@ output.elasticsearch: # on error. #required_acks: 1 - # The number of seconds to wait for new events between two producer API calls. - #flush_interval: 1s - # The configurable ClientID used for logging, debugging, and auditing # purposes. The default is "beats". #client_id: beats diff --git a/libbeat/docs/outputconfig.asciidoc b/libbeat/docs/outputconfig.asciidoc index 751dd55650a8..61ba17df75a5 100644 --- a/libbeat/docs/outputconfig.asciidoc +++ b/libbeat/docs/outputconfig.asciidoc @@ -292,12 +292,6 @@ spooler size. The http request timeout in seconds for the Elasticsearch request. The default is 90. -===== `flush_interval` - -The number of seconds to wait for new events between two bulk API index requests. -If `bulk_max_size` is reached before this interval expires, additional bulk index -requests are made. - ===== `ssl` Configuration options for SSL parameters like the certificate authority to use @@ -731,10 +725,6 @@ The ACK reliability level required from broker. 0=no response, 1=wait for local Note: If set to 0, no ACKs are returned by Kafka. Messages might be lost silently on error. -===== `flush_interval` - -The number of seconds to wait for new events between two producer API calls. - ===== `ssl` Configuration options for SSL parameters like the root CA for Kafka connections. See diff --git a/libbeat/outputs/fileout/file.go b/libbeat/outputs/fileout/file.go index b19096a48bb9..2ec88ccae8fd 100644 --- a/libbeat/outputs/fileout/file.go +++ b/libbeat/outputs/fileout/file.go @@ -31,7 +31,6 @@ func makeFileout( } // disable bulk support in publisher pipeline - cfg.SetInt("flush_interval", -1, -1) cfg.SetInt("bulk_max_size", -1, -1) fo := &fileOutput{beat: beat, stats: stats} diff --git a/libbeat/outputs/logstash/logstash_integration_test.go b/libbeat/outputs/logstash/logstash_integration_test.go index c23c607fe952..ae6bc4f43179 100644 --- a/libbeat/outputs/logstash/logstash_integration_test.go +++ b/libbeat/outputs/logstash/logstash_integration_test.go @@ -148,12 +148,10 @@ func newTestElasticsearchOutput(t *testing.T, test string) *testOutputer { index := testElasticsearchIndex(test) connection := esConnect(t, index) - flushInterval := 0 bulkSize := 0 config, _ := common.NewConfigFrom(map[string]interface{}{ "hosts": []string{getElasticsearchHost()}, "index": connection.index, - "flush_interval": &flushInterval, "bulk_max_size": &bulkSize, "username": os.Getenv("ES_USER"), "password": os.Getenv("ES_PASS"), diff --git a/libbeat/outputs/output_reg.go b/libbeat/outputs/output_reg.go index a8f176c3defd..e279ec2806eb 100644 --- a/libbeat/outputs/output_reg.go +++ b/libbeat/outputs/output_reg.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/cfgwarn" ) var outputReg = map[string]Factory{} @@ -42,5 +43,9 @@ func Load(info common.BeatInfo, stats *Stats, name string, config *common.Config return Group{}, fmt.Errorf("output type %v undefined", name) } + if err := cfgwarn.CheckRemoved5xSetting(config, "flush_interval"); err != nil { + return Fail(err) + } + return factory(info, stats, config) } diff --git a/libbeat/tests/system/test_base.py b/libbeat/tests/system/test_base.py index 0bb8ccd1d966..c328500a57b3 100644 --- a/libbeat/tests/system/test_base.py +++ b/libbeat/tests/system/test_base.py @@ -154,7 +154,6 @@ def test_console_output_size_flush(self): console={ "pretty": "false", "bulk_max_size": 1, - "flush_interval": "1h" } ) diff --git a/metricbeat/metricbeat.reference.yml b/metricbeat/metricbeat.reference.yml index 4af153c3f40f..a99fc0e61078 100644 --- a/metricbeat/metricbeat.reference.yml +++ b/metricbeat/metricbeat.reference.yml @@ -592,11 +592,6 @@ output.elasticsearch: # Configure http request timeout before failing an request to Elasticsearch. #timeout: 90 - # The number of seconds to wait for new events between two bulk API index requests. - # If `bulk_max_size` is reached before this interval expires, addition bulk index - # requests are made. - #flush_interval: 1s - # Use SSL settings for HTTPS. Default is true. #ssl.enabled: true @@ -796,9 +791,6 @@ output.elasticsearch: # on error. #required_acks: 1 - # The number of seconds to wait for new events between two producer API calls. - #flush_interval: 1s - # The configurable ClientID used for logging, debugging, and auditing # purposes. The default is "beats". #client_id: beats diff --git a/packetbeat/packetbeat.reference.yml b/packetbeat/packetbeat.reference.yml index 2bec7ccb6ba4..9a19c371c827 100644 --- a/packetbeat/packetbeat.reference.yml +++ b/packetbeat/packetbeat.reference.yml @@ -624,11 +624,6 @@ output.elasticsearch: # Configure http request timeout before failing an request to Elasticsearch. #timeout: 90 - # The number of seconds to wait for new events between two bulk API index requests. - # If `bulk_max_size` is reached before this interval expires, addition bulk index - # requests are made. - #flush_interval: 1s - # Use SSL settings for HTTPS. Default is true. #ssl.enabled: true @@ -828,9 +823,6 @@ output.elasticsearch: # on error. #required_acks: 1 - # The number of seconds to wait for new events between two producer API calls. - #flush_interval: 1s - # The configurable ClientID used for logging, debugging, and auditing # purposes. The default is "beats". #client_id: beats diff --git a/winlogbeat/winlogbeat.reference.yml b/winlogbeat/winlogbeat.reference.yml index d2407689e328..8f900c8da6fb 100644 --- a/winlogbeat/winlogbeat.reference.yml +++ b/winlogbeat/winlogbeat.reference.yml @@ -201,11 +201,6 @@ output.elasticsearch: # Configure http request timeout before failing an request to Elasticsearch. #timeout: 90 - # The number of seconds to wait for new events between two bulk API index requests. - # If `bulk_max_size` is reached before this interval expires, addition bulk index - # requests are made. - #flush_interval: 1s - # Use SSL settings for HTTPS. Default is true. #ssl.enabled: true @@ -405,9 +400,6 @@ output.elasticsearch: # on error. #required_acks: 1 - # The number of seconds to wait for new events between two producer API calls. - #flush_interval: 1s - # The configurable ClientID used for logging, debugging, and auditing # purposes. The default is "beats". #client_id: beats