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

Remove deprecated 'host' option #1474

Merged
merged 1 commit into from
Apr 26, 2016
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.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ https://github.com/elastic/beats/compare/v5.0.0-alpha1...master[Check the HEAD d
- Add scripts for managing the dashboards of a single Beat {pull}1359[1359]
- On DEB/RPM installations, the binary files are now found under `/usr/share/{{beat_name}}/bin`, not in `/usr/bin`. {pull}1385[1385]
- The logs are written by default to self rotating files, instead of syslog. {pull}1371[1371]
- Remove deprecated `host` option from elasticsearch, logstash and redis outputs. {pull}1474[1474]

*Packetbeat*

Expand Down
8 changes: 2 additions & 6 deletions libbeat/docs/outputconfig.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,9 @@ The number of workers per configured host publishing events to Elasticsearch. Th
is best used with load balancing mode enabled. Example: If you have 2 hosts and
3 workers, in total 6 workers are started (3 for each host).

===== host (DEPRECATED)

The host of the Elasticsearch server. This option is deprecated because it is replaced by <<hosts-option>>.

===== port (DEPRECATED)
===== port

The port of the Elasticsearch server. This option is deprecated because it is replaced by <<hosts-option>>.
The default port of the Elasticsearch server if the port number is missing in <<hosts-option>> URL. The default port number is 9200.

===== username

Expand Down
10 changes: 1 addition & 9 deletions libbeat/outputs/mode/mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ func MakeAsyncClients(

func ReadHostList(cfg *common.Config) ([]string, error) {
config := struct {
Host string `config:"host"`
Hosts []string `config:"hosts"`
Worker int `config:"worker"`
}{
Expand All @@ -194,14 +193,7 @@ func ReadHostList(cfg *common.Config) ([]string, error) {
return nil, err
}

// TODO: remove config.Host
var lst []string
if len(config.Hosts) > 0 {
lst = config.Hosts
} else if config.Host != "" {
lst = []string{config.Host}
}

lst := config.Hosts
if len(lst) == 0 || config.Worker <= 1 {
return lst, nil
}
Expand Down