From 32ecdc703cb67e823b1acdd468c780fc70fe124d Mon Sep 17 00:00:00 2001 From: urso Date: Mon, 7 Jan 2019 03:57:18 +0100 Subject: [PATCH 1/4] Mark redis/logstash port settings as deprecated --- libbeat/_meta/config.reference.yml | 4 ---- libbeat/outputs/logstash/logstash.go | 5 +++++ libbeat/outputs/redis/redis.go | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libbeat/_meta/config.reference.yml b/libbeat/_meta/config.reference.yml index d209f058e0e..18742e2483e 100644 --- a/libbeat/_meta/config.reference.yml +++ b/libbeat/_meta/config.reference.yml @@ -620,10 +620,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is beatname. #key: beatname diff --git a/libbeat/outputs/logstash/logstash.go b/libbeat/outputs/logstash/logstash.go index db9dbebe4ed..cf6a40ed88f 100644 --- a/libbeat/outputs/logstash/logstash.go +++ b/libbeat/outputs/logstash/logstash.go @@ -20,6 +20,7 @@ package logstash import ( "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/cfgwarn" "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/outputs" @@ -51,6 +52,10 @@ func makeLogstash( return outputs.Fail(err) } + if cfg.HasField("port") { + cfgwarn.Deprecate("7.0.0", "The Logstash outputs port setting") + } + hosts, err := outputs.ReadHostList(cfg) if err != nil { return outputs.Fail(err) diff --git a/libbeat/outputs/redis/redis.go b/libbeat/outputs/redis/redis.go index ea6e0801a23..fb27daafaca 100644 --- a/libbeat/outputs/redis/redis.go +++ b/libbeat/outputs/redis/redis.go @@ -23,6 +23,7 @@ import ( "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/cfgwarn" "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/outputs" @@ -56,6 +57,10 @@ func makeRedis( cfg.SetString("index", -1, beat.Beat) } + if cfg.HasField("port") { + cfgwarn.Deprecate("7.0.0", "The Redis outputs port setting") + } + // ensure we have a `key` field in settings if !cfg.HasField("key") { s, err := cfg.String("index", -1) From 79cbb16461930c30257eb279b2e2f80ee0a21368 Mon Sep 17 00:00:00 2001 From: urso Date: Mon, 7 Jan 2019 04:02:04 +0100 Subject: [PATCH 2/4] add changelog --- CHANGELOG.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 792dbbfcf98..14b97c39246 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -13,6 +13,7 @@ https://github.com/elastic/beats/compare/v6.6.0...6.x[Check the HEAD diff] - Dissect syntax change, use * instead of ? when working with field reference. {issue}8054[8054] - Fix registry handle leak on Windows (https://github.com/elastic/go-sysinfo/pull/33). {pull}9920[9920] - Allow to unenroll a Beat from the UI. {issue}9452[9452] +- Port settings have been deprecated in redis/logstash output and will be removed in 7.0. {pull}9915[9915] *Auditbeat* From ecb63d399996dbc44b918de57465b8b5241cad3e Mon Sep 17 00:00:00 2001 From: urso Date: Wed, 16 Jan 2019 17:49:45 +0100 Subject: [PATCH 3/4] Update x-pack reference configs --- x-pack/auditbeat/auditbeat.reference.yml | 4 ---- x-pack/filebeat/filebeat.reference.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/x-pack/auditbeat/auditbeat.reference.yml b/x-pack/auditbeat/auditbeat.reference.yml index dd01651c310..090cbe3c48d 100644 --- a/x-pack/auditbeat/auditbeat.reference.yml +++ b/x-pack/auditbeat/auditbeat.reference.yml @@ -753,10 +753,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is auditbeat. #key: auditbeat diff --git a/x-pack/filebeat/filebeat.reference.yml b/x-pack/filebeat/filebeat.reference.yml index 3b4741a89d0..9ee57caa5bb 100644 --- a/x-pack/filebeat/filebeat.reference.yml +++ b/x-pack/filebeat/filebeat.reference.yml @@ -1453,10 +1453,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is filebeat. #key: filebeat From 184c93b99fabcf2e47e2d2b20ebdf5fda835f3b3 Mon Sep 17 00:00:00 2001 From: urso Date: Sun, 20 Jan 2019 00:36:54 +0100 Subject: [PATCH 4/4] Remove redis port from configs --- auditbeat/auditbeat.reference.yml | 4 ---- filebeat/filebeat.reference.yml | 4 ---- heartbeat/heartbeat.reference.yml | 4 ---- journalbeat/journalbeat.reference.yml | 4 ---- metricbeat/metricbeat.reference.yml | 4 ---- packetbeat/packetbeat.reference.yml | 4 ---- winlogbeat/winlogbeat.reference.yml | 4 ---- x-pack/functionbeat/functionbeat.reference.yml | 4 ---- 8 files changed, 32 deletions(-) diff --git a/auditbeat/auditbeat.reference.yml b/auditbeat/auditbeat.reference.yml index 567cfd10093..26a10b71b79 100644 --- a/auditbeat/auditbeat.reference.yml +++ b/auditbeat/auditbeat.reference.yml @@ -727,10 +727,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is auditbeat. #key: auditbeat diff --git a/filebeat/filebeat.reference.yml b/filebeat/filebeat.reference.yml index 2b54cf209b0..0046abf0651 100644 --- a/filebeat/filebeat.reference.yml +++ b/filebeat/filebeat.reference.yml @@ -1419,10 +1419,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is filebeat. #key: filebeat diff --git a/heartbeat/heartbeat.reference.yml b/heartbeat/heartbeat.reference.yml index ceec576adb9..5a50ae7dfbf 100644 --- a/heartbeat/heartbeat.reference.yml +++ b/heartbeat/heartbeat.reference.yml @@ -876,10 +876,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is heartbeat. #key: heartbeat diff --git a/journalbeat/journalbeat.reference.yml b/journalbeat/journalbeat.reference.yml index fc0a767ff71..e76dedf5c56 100644 --- a/journalbeat/journalbeat.reference.yml +++ b/journalbeat/journalbeat.reference.yml @@ -678,10 +678,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is journalbeat. #key: journalbeat diff --git a/metricbeat/metricbeat.reference.yml b/metricbeat/metricbeat.reference.yml index 7ad5f978bae..13c9bad44c7 100644 --- a/metricbeat/metricbeat.reference.yml +++ b/metricbeat/metricbeat.reference.yml @@ -1306,10 +1306,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is metricbeat. #key: metricbeat diff --git a/packetbeat/packetbeat.reference.yml b/packetbeat/packetbeat.reference.yml index 1f89426293a..2258cbb3815 100644 --- a/packetbeat/packetbeat.reference.yml +++ b/packetbeat/packetbeat.reference.yml @@ -1101,10 +1101,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is packetbeat. #key: packetbeat diff --git a/winlogbeat/winlogbeat.reference.yml b/winlogbeat/winlogbeat.reference.yml index 7d3f6c1d3fc..5ac07d63522 100644 --- a/winlogbeat/winlogbeat.reference.yml +++ b/winlogbeat/winlogbeat.reference.yml @@ -649,10 +649,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is winlogbeat. #key: winlogbeat diff --git a/x-pack/functionbeat/functionbeat.reference.yml b/x-pack/functionbeat/functionbeat.reference.yml index da7ee200f92..621580d6fec 100644 --- a/x-pack/functionbeat/functionbeat.reference.yml +++ b/x-pack/functionbeat/functionbeat.reference.yml @@ -714,10 +714,6 @@ output.elasticsearch: # unreachable, the events are distributed to the reachable servers only. #hosts: ["localhost:6379"] - # The Redis port to use if hosts does not contain a port number. The default - # is 6379. - #port: 6379 - # The name of the Redis list or channel the events are published to. The # default is functionbeat. #key: functionbeat