# How to use mutate filter plugin in output

**URL:** https://discuss.elastic.co/t/how-to-use-mutate-filter-plugin-in-output/274578
**Category:** Logstash
**Created:** [June 1, 2021, 5:49am UTC](https://discuss.elastic.co/t/how-to-use-mutate-filter-plugin-in-output/274578 "2021-06-01T05:49:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rknd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rknd/32/103882_2.png) [@rknd](https://discuss.elastic.co/u/rknd)
#### Post date: [June 1, 2021, 5:49am UTC](https://discuss.elastic.co/t/how-to-use-mutate-filter-plugin-in-output/274578/1 "2021-06-01T05:49:36Z")

</div>

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.

```auto
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

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 1, 2021, 1:40pm UTC](https://discuss.elastic.co/t/how-to-use-mutate-filter-plugin-in-output/274578/2 "2021-06-01T13:40:36Z")

</div>

You can use pipeline-to-pipeline communication with a [forked-path](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#forked-path-pattern) pattern.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 29, 2021, 1:41pm UTC](https://discuss.elastic.co/t/how-to-use-mutate-filter-plugin-in-output/274578/3 "2021-06-29T13:41:03Z")

</div>

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