# Removing fields for certain outputs

**URL:** <https://discuss.elastic.co/t/removing-fields-for-certain-outputs/38171>\
**Category:** Logstash\
**Created:** [December 30, 2015, 11:40am UTC](https://discuss.elastic.co/t/removing-fields-for-certain-outputs/38171 "2015-12-30T11:40:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerneldemon](https://avatars.discourse-cdn.com/v4/letter/k/c77e96/32.png) [@kerneldemon](https://discuss.elastic.co/u/kerneldemon)\
**Post date:** [December 30, 2015, 11:40am UTC](https://discuss.elastic.co/t/removing-fields-for-certain-outputs/38171/1 "2015-12-30T11:40:59Z")

</div>

Hi there

I want to process certain log data using logstash and then pipe it to multiple outputs.  
The data I wish to process always contains sensitive fields that I wish to send to some of the outputs and remove for others.

This is the gist of what I'm trying to do:

```
output {
  elasticsearch {
     # the whole event
  }
  rabbitmq {
     # the whole event MINUS the sensitive fields
  }

  # other outputs (some of them receive all of the event fields and some of them receive everything except the sensitive fields)
  # ...
}

```

I can see that is it's possible to remove the field for all of the outputs, but I only want to do that for some of them. Is this possible in a single configuration?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 30, 2015, 11:46am UTC](https://discuss.elastic.co/t/removing-fields-for-certain-outputs/38171/2 "2015-12-30T11:46:02Z")

</div>

I have seen this requested before and a workaround for this is to create one event per output using the [clone filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-clone.html) and then format these separately and send them to the correct output using conditionals. It is not terribly elegant but usually works.

---

<div class="post-metadata">

**Author:** ![kerneldemon](https://avatars.discourse-cdn.com/v4/letter/k/c77e96/32.png) [@kerneldemon](https://discuss.elastic.co/u/kerneldemon)\
**Post date:** [December 30, 2015, 12:39pm UTC](https://discuss.elastic.co/t/removing-fields-for-certain-outputs/38171/3 "2015-12-30T12:39:30Z")

</div>

Yeah, that seems to work pretty well. Thanks for the tip!

---

<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:** [July 6, 2017, 5:17am UTC](https://discuss.elastic.co/t/removing-fields-for-certain-outputs/38171/4 "2017-07-06T05:17:09Z")

</div>


