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

sprintf pipeline to pipeline communications #16457

Open
amitaiporat opened this issue Sep 16, 2024 · 1 comment
Open

sprintf pipeline to pipeline communications #16457

amitaiporat opened this issue Sep 16, 2024 · 1 comment

Comments

@amitaiporat
Copy link

sprintf does not work for pipeline to pipeline communication in logstash. send_to block does not acknowledge sprintf formatted inputs.

For example, an ideal logstash output would look like the following:

output {
     pipeline { send_to => [@metadata][field]}
}

Because logstash send_to block does currently not recognize sprintf, must use conditional logic to wrap send_to block. A config must contain the following workaround.

output {
    if [@metadata][field] {
        if [@metadata][field] == "field_value" {
            pipeline { send_to => ["pipeline_name", "field_value", ...]}
    else {...}
}
@yaauie
Copy link
Member

yaauie commented Sep 16, 2024

You are correct that the pipeline output's send_to does not support sprintf.

Due to the design of the pipeline bus, all destination pipeline addresses must be known to the output plugin at plugin registration (before pipeline startup). While dynamic routing may be possible at some point in the future, it would be exceptionally tricky to implement in a way that doesn't risk automating data-loss.

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

No branches or pull requests

2 participants