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

Allow the clones to be specified by an array in the event #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alcanzar
Copy link

@alcanzar alcanzar commented Mar 2, 2017

This change allows the list of clones to come from a field in the event for those cases where you don't know the number of clones that will be needed ahead of time.

@jordansissel
Copy link
Contributor

I think I understand the goal of this change, but I am not sure of the use case. Can you help me understand better how you would use this?

@alcanzar
Copy link
Author

This came up on stack overflow: http://stackoverflow.com/questions/42447294/how-do-you-split-json-into-multiple-events-in-logstash-where-events-are-parts-o/42448010#42448010

The person had a weird structure where they had some common information at the top level and then some events that were related and wanted to dynamically create clones with names of the specific events and then remove the non-relevant parts.

Basically if you don't know ahead of time how many clones you need until you inspect the data, the use case is that you build up that list in a field (or the field is provided as part of the event), and then you dynamically create the number of clones you need so that you can get enough replicates to insert the exploded events.

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

Successfully merging this pull request may close these issues.

3 participants