# Filtered and unfiltered outputs

**URL:** https://discuss.elastic.co/t/filtered-and-unfiltered-outputs/140239
**Category:** Logstash
**Created:** [July 17, 2018, 2:46am UTC](https://discuss.elastic.co/t/filtered-and-unfiltered-outputs/140239 "2018-07-17T02:46:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rocknroll](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rocknroll](https://discuss.elastic.co/u/rocknroll)
#### Post date: [July 17, 2018, 2:46am UTC](https://discuss.elastic.co/t/filtered-and-unfiltered-outputs/140239/1 "2018-07-17T02:46:17Z")

</div>

I would like to be able to take a copy of each incoming Beats event and output directly to a file, then pass the events through a filter and output to Elasticsearch, i.e.  
Input-\>Output (file)-\>Filter-\>Output(Elasticsearch).

Of course what will happen is Input-\>Filter-\>Output(file)-\>Output(Elasticsearch).

Does anyone know of a way to create both filtered and unfiltered outputs from within one pipeline?

Many thanks

---

<div class="post-metadata">

### Author: ![paz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paz/32/28003_2.png) [@paz](https://discuss.elastic.co/u/paz)
#### Post date: [July 17, 2018, 7:20am UTC](https://discuss.elastic.co/t/filtered-and-unfiltered-outputs/140239/2 "2018-07-17T07:20:18Z")

</div>

You can use the [clone](https://www.elastic.co/guide/en/logstash/current/plugins-filters-clone.html) filter to create a copy of the original event with another type or a certain tag and use that tag as a filtering condition for extra filters or outputs.

---

<div class="post-metadata">

### Author: ![rocknroll](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rocknroll](https://discuss.elastic.co/u/rocknroll)
#### Post date: [July 18, 2018, 2:16am UTC](https://discuss.elastic.co/t/filtered-and-unfiltered-outputs/140239/3 "2018-07-18T02:16:20Z")

</div>

Thank you paz, that looks exactly like what I need

---

<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: [August 15, 2018, 2:16am UTC](https://discuss.elastic.co/t/filtered-and-unfiltered-outputs/140239/4 "2018-08-15T02:16:28Z")

</div>

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