Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark redis/logstash port settings as deprecated #9915

Merged
merged 4 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down
4 changes: 0 additions & 4 deletions auditbeat/auditbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions heartbeat/heartbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions journalbeat/journalbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions libbeat/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions libbeat/outputs/logstash/logstash.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions libbeat/outputs/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions packetbeat/packetbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions winlogbeat/winlogbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions x-pack/auditbeat/auditbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions x-pack/filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions x-pack/functionbeat/functionbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down