From 56758896aca4cccefeb82d3bc91034a5382acb3e Mon Sep 17 00:00:00 2001 From: urso Date: Mon, 25 Apr 2016 17:49:12 +0200 Subject: [PATCH] Remove deprecated 'host' option remove support for deprecated `host` option in elasticsearch, logstash, kafka and redis output. --- CHANGELOG.asciidoc | 1 + libbeat/docs/outputconfig.asciidoc | 8 ++------ libbeat/outputs/mode/mode.go | 10 +--------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 08ee1f5a5509..30980f63ef97 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -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* diff --git a/libbeat/docs/outputconfig.asciidoc b/libbeat/docs/outputconfig.asciidoc index 1ebcf085e0a2..137d5529c61d 100644 --- a/libbeat/docs/outputconfig.asciidoc +++ b/libbeat/docs/outputconfig.asciidoc @@ -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 <>. - -===== port (DEPRECATED) +===== port -The port of the Elasticsearch server. This option is deprecated because it is replaced by <>. +The default port of the Elasticsearch server if the port number is missing in <> URL. The default port number is 9200. ===== username diff --git a/libbeat/outputs/mode/mode.go b/libbeat/outputs/mode/mode.go index be602b19fd8c..7c3c26a39d8f 100644 --- a/libbeat/outputs/mode/mode.go +++ b/libbeat/outputs/mode/mode.go @@ -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"` }{ @@ -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 }