How to run a pipeline from a pipeline

Hi All,

in my project I have 3 pipelines, I know that a pipeline can be scheduled but in my case I need to run the third one at the end of other two.

There is a way to do this? run the pipelines in order:

pipeline1 -> pipeline2 -> pipeline3

thanks to all
D.

Pipeline-to-pipline communication is documented here: Pipeline-to-pipeline communication | Logstash Reference [8.4] | Elastic

There are a number of architectural patterns with examples about mid way down that page

steve thanks for your response it is very useful.

is it possible exec a pipeline only at the end of another one?

thanks.

Maybe something like this would work for a linear 1>2>3. If you want two pipelines to feed into one then maybe see the Collector architectural pattern in the above link.

# config/pipelines.yml
- pipeline.id: stage_1
  config.string: |
    input { beats { port => 5044 } }
    output { pipeline { send_to => [stage_2] } }
- pipeline.id: stage_2
  queue.type: persisted
  config.string: |
    input { pipeline { address => stage_2 } }
    filter {
      # do something
    }
    output { pipeline { send_to => [stage_3] } }
- pipeline.id: stage_3
  queue.type: persisted
  config.string: |
    input { pipeline { address => stage_3 } }
    output { elasticsearch { } }

This is not possible, if you configure a pipeline in pipelines.yml, it will start when Logstash is started.

You can configure a pipeline to send data to another pipeline, as the examples that @stevesimpson shared, but the events will be processed as they arrive.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.