How to use mutate filter plugin in output

I have a logstash configuration. With that configuration logstash do some operation in filter and send outputs. Everything works well.

I want one more elasticsearch output in same configuration file. I mean after parsing the logs, logstash send results to one index after that removing some fields and send them to another index.

Note : I have also tried clone plugin but that is not solving the question cause this plugin use "type" keyword and i use this keyword in a lots place in my configuration.

My aim is in below example.

output {
 elasticsearch {
      ..index1..
 }
 mutate {
   remove_field ...
} 
mutate {
   add_field ..
}
elasticsearch {
  ... index2 ...
}

}

But i can not work with mutate plugin in output ? How can i achieve this ?

Thanks for answering

You can use pipeline-to-pipeline communication with a forked-path pattern.

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