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

Splitting one input into multiple outputs #133

Open
MayurVirkar opened this issue Apr 24, 2020 · 3 comments
Open

Splitting one input into multiple outputs #133

MayurVirkar opened this issue Apr 24, 2020 · 3 comments

Comments

@MayurVirkar
Copy link

Hello,
Basically, I have one input record which is JSON of array of 1000 records, I need to split them into individual 1000 records and run filters on them and insert them individually into ELK.
How can I do it?

@f4t
Copy link

f4t commented Dec 18, 2020

Hi, I'm interested by the same feature.
Based on my understanding of the code unfortunately it looks like Gogstash filters only allow exactly 1 (one) event out (as in one event in -> one event out).

Can anyone confirm this ?

I have several use-cases where it'd be useful for filters to allow either zero, one, or multiple events out:

  • "splitting" as requested by Mayur above is one of those where we would let multiple events out of the filter.
  • "dropping" events would also be a use-case for a filter that returns zero events (although this can already be done through conditional outputs I feel it might be interesting to remove unnecessary processing of events we want to discard).
  • Lastly, I'd like to implement event-pairing filters, similar to Logstash "ellapsed" and "aggregate" filters. Those filters hold events in a buffer before releasing the combined result, therefore such filters might need to return zero event first, then two at once.

@tsaikd
Copy link
Owner

tsaikd commented Dec 18, 2020

At the beginning, it's designed to process logs one by one. If you want to handle M inputs and N outputs, M and N are unsigned integers, some interfaces need to be changed.

@helgeolav
Copy link
Contributor

If you need something to split your input have a look at Gollum, also written in go.

Gollum is an n:m multiplexer that gathers messages from different sources and broadcasts them to a set of destinations.

It will not solve all of your issues but see if you can use it for something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants