Logstash muitiple pipeline to pipeline configue

I'd like to do a multi-pipeline.

- pipeline.id: beats-server

input { beats { port => 5044 } }
output {  
    if [type] == log1 {
      pipeline { send_to => log1 }
    } else if [type] == log2 {
      pipeline { send_to => log2}
    } 
}

- pipeline.id: log1-processing

input { 
     pipeline { address => log1} }
  output {
    elasticsearch { .... }
  }

 - pipeline.id: log2-processing
input { 
     pipeline { address => log2} }
  output {
    elasticsearch { .... }
  }

but Setting up is very difficult when there are many pipelines to deal with.
Can I select a dynamic pipe line with the field that I received from the filebeat?

For example,
If you send fields from the file bits, I want to do it in simple code as shown below.

- pipeline.id: beats-server

input { beats { port => 5044 } }
output {  
      pipeline { send_to => [fields][type] }
}

But the this code doesn't work.
Can dynamically load a pipeline using variables?

No, you can not name pipelines dynamically. They are created at startup before any events are processed and must exist. Basib pipeline IDs on event data could lead to you sending data to pipelines that do not exist, which would be bad.

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