Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

The shipper should report itself as FAILED when multiple outputs are configured. #171

Open
Tracked by #16
cmacknz opened this issue Nov 10, 2022 · 3 comments
Open
Tracked by #16
Labels
8.7-candidate Team:Elastic-Agent Label for the Agent team

Comments

@cmacknz
Copy link
Member

cmacknz commented Nov 10, 2022

The shipper does not support multiple outputs. When multiple outputs are detected in the shipper configuration provided by the agent, the shipper should report itself as in the FAILED state on its next checkin with the agent.

Currently the behaviour configuration multiple outputs is to pick one based on an arbitrary ordering:

func outputFromConfig(config output.Config, queue *queue.Queue) (Output, error) {
if config.Elasticsearch != nil {
return elasticsearch.NewElasticSearch(config.Elasticsearch, queue), nil
}
if config.Kafka != nil && config.Kafka.Enabled {
return kafka.NewKafka(config.Kafka, queue), nil
}
if config.Console != nil && config.Console.Enabled {
return output.NewConsole(queue), nil
}
return nil, errors.New("no active output configuration")
}

@fearful-symmetry
Copy link
Contributor

This sort of connects to elastic/elastic-agent#1729, since that arbitrary ordering is just because we need to check the config one-by-one before we fully unpack things. At the very least, it will be easy to just check to see if more than one output has enabled: true set.

@pierrehilbert
Copy link
Contributor

@cmacknz / @leehinman could we close this one with the new shipper plan?

@cmacknz
Copy link
Member Author

cmacknz commented May 4, 2023

Beats doesn't support multiple outputs, but there might be some work to do to get the error to present in a nice way (associated with the agent output unit).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
8.7-candidate Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

3 participants