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

Provide a way to implement conditional routing of events to specific outputs #3120

Open
ppf2 opened this issue Dec 5, 2016 · 14 comments
Open
Labels
discuss Issue needs further discussion. enhancement Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@ppf2
Copy link
Member

ppf2 commented Dec 5, 2016

Would be nice for beats to provide a feature to allow conditional routing of events to outputs, eg. type A log events to be routed to Logstash A instance, type B log events to be routed to Logstash B instance. Perhaps we can extend the generic filtering capability to provide this type of conditional routing. Currently, to implement this, the user will have to configure multiple beats instances, or send the events to a Logstash instance and perform the routing from there.

@monicasarbu monicasarbu added the discuss Issue needs further discussion. label Feb 17, 2017
@botelastic
Copy link

botelastic bot commented Jul 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added Stalled needs_team Indicates that the issue/PR needs a Team:* label labels Jul 9, 2020
@botelastic botelastic bot closed this as completed Aug 8, 2020
@mbarretta
Copy link

Still a common ask, reopening for PM visibility

@mbarretta mbarretta reopened this Aug 26, 2021
@botelastic botelastic bot removed the Stalled label Aug 26, 2021
@ruflin ruflin added the Team:Elastic-Agent Label for the Agent team label Aug 30, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 30, 2021
@jlind23
Copy link
Collaborator

jlind23 commented Apr 1, 2022

ping @nimarezainia is this something you have in your radar?

@ruflin ruflin added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Apr 5, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@ruflin
Copy link
Member

ruflin commented Apr 5, 2022

I think with the v2 architecture of Elastic Agent his will become possible. Each input can select its output. I would not directly call it conditional routing but if you have 2 logfile inputs, each could use its own output.

@nimarezainia
Copy link
Contributor

@ruflin @cmacknz,
Running thistrain of thought past you: on the standalone agent for an input one could configure "use_output" to satisfy this requirement. of course we currently support Elasticsearch and Logstash only. But the user has the option of defining multiple Logstash instance (as an example) and then reference these in the input section of the configuration file.

To address our Beats users who need this feature _ I would say migration to standalone is a viable option.

However we do want to provide this functionality for the fleet managed agents also, where the output is configured at the datastream level (discussion point? i believe it can't be at the integration level. Users would need more granularity logs vs metrics as an example). Perhaps short term, the first step here would be to apply the config in an advanced yaml box with guidence on how it should be done.

Proper solution imo is to have a UI configurable under each datastream to choose the output for that datastream. I'd be curious to hear if for this we need the V2 shipper to complete?

@ruflin
Copy link
Member

ruflin commented Apr 25, 2022

Proper solution imo is to have a UI configurable under each datastream to choose the output for that datastream. I'd be curious to hear if for this we need the V2 shipper to complete?

I personally think this is overkill. I would rather set it on the level of the integration. If a user wants to ship logs and metrics to two different outputs, the integration has to be configured twice, once with logs and once with metrics enabled for example.

@fholzer
Copy link
Contributor

fholzer commented May 9, 2022

of course we currently support Elasticsearch and Logstash only.
Not sure i follow.

I have a use case where we have different types logs and modules on a single server. Ideally I'd like to configure the module and logfile A to be shipped to elasticsearch, with the module using the resp. ingest pipeline. While having log file B shipped to Kafka, where a logstash cluster read from for further processing and enrichment of the data.

While it's absolutely doable to setup 2 or even 3 filebeat instances, from a maintenance overhead POV it just seems like overkill. The configuration and automation effort is just really high. The filebeat RPM comes with all the right directories, config files, and the systemd unit. To setup an additional beat, we'd have to change all of this substantially. Having dedicates state directory (/var/lib), config directory (/etc/filebeat - which, on every upgrade we'd probably have to manually check and compare files to the previous version), the systemd unit file we'd also need to duplicate or change the existing one to handle instance (%i).

Generally speaking, it's just really not convenient to run multiple instances of filebeat. (Which, to be fair, isn't a problem specific to filebeat, but a general "problem" for software that comes pre-packaged for running a single instance of that software, when you want/need to run multiple instances.)

Maybe an alternative to supporting multiple outputs in filebeat could be to support the use case where you have one or more regular inputs shipped to a non-elasticsearch output, while also having module enabled which ship to elasticsearch. While technically this would be a 2-output setup, it's actually only the modules which use the ES output.

Or, simply making it easier to run a multi-instance setup with the pre-built RPM provided by elastic. (Having an instance based systemd unit file, maybe also scripts that prepare necessary directories and default config files on first run, etc.)

Curious to hear you thoughts on this.

@botelastic
Copy link

botelastic bot commented May 9, 2023

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label May 9, 2023
@zez3
Copy link

zez3 commented May 10, 2023

This is still relevant.
My use case is a bit different described here: https://alexmarquardt.com/2021/03/15/driving-filebeat-data-into-separate-indices-uses-legacy-index-templates/
But I get some permission issues when I try to route to a different datastream

@botelastic botelastic bot removed the Stalled label May 10, 2023
@zez3
Copy link

zez3 commented May 10, 2023

My use case would be foe reroute processor in filebeat
https://www.elastic.co/guide/en/elasticsearch/reference/master/reroute-processor.html

@botelastic
Copy link

botelastic bot commented May 9, 2024

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label May 9, 2024
@zez3
Copy link

zez3 commented May 9, 2024

Still relevant

@botelastic botelastic bot removed the Stalled label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issue needs further discussion. enhancement Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

9 participants