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

Deprecate loading more than one output #4907

Merged
merged 1 commit into from
Aug 16, 2017
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 @@ -87,6 +87,7 @@ https://github.com/elastic/beats/compare/v5.4.1...master[Check the HEAD diff]
==== Deprecated

*Affecting all Beats*
- Loading more than one output is deprecated. {pull}4907[4907]

*Filebeat*
- Deprecate `document_type` prospector config option as _type is removed in elasticsearch 6.0. Use fields instead. {pull}4225[4225]
Expand Down
7 changes: 6 additions & 1 deletion libbeat/publisher/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import (
"sync/atomic"
"time"

"github.com/nranchev/go-libGeoIP"

"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/common/op"
"github.com/elastic/beats/libbeat/logp"
"github.com/elastic/beats/libbeat/outputs"
"github.com/elastic/beats/libbeat/processors"
"github.com/nranchev/go-libGeoIP"

// load supported output plugins
_ "github.com/elastic/beats/libbeat/outputs/console"
Expand Down Expand Up @@ -223,6 +224,10 @@ func (publisher *BeatPublisher) init(
publisher.wsPublisher.Init()
publisher.wsOutput.Init()

if len(configs) > 1 {
logp.Warn("Support for loading more than one output is deprecated and will not be supported in version 6.0.")
}

if !publisher.disabled {
plugins, err := outputs.InitOutputs(beatName, configs, shipper.TopologyExpire)
if err != nil {
Expand Down