# Parse the same input in two different ways

**URL:** <https://discuss.elastic.co/t/parse-the-same-input-in-two-different-ways/147999>\
**Category:** Logstash\
**Created:** [September 10, 2018, 5:44pm UTC](https://discuss.elastic.co/t/parse-the-same-input-in-two-different-ways/147999 "2018-09-10T17:44:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanV](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@DanV](https://discuss.elastic.co/u/DanV)\
**Post date:** [September 10, 2018, 5:44pm UTC](https://discuss.elastic.co/t/parse-the-same-input-in-two-different-ways/147999/1 "2018-09-10T17:44:17Z")

</div>

Hello,

i have the following situation, i'm receiving logs from UDP port 6514 as the input for logstash, what i wanna do is apply two different filters to the same logs (parallely) and send them off to elasticsearch in two different indexes, something like:

```
                         Log Input 
                              |
                              |---------------------------------------------|
                              | |
                         Filter A Filter B
                              | |
                              | |
                          Index A Index B

```

is it possible to do this in the same parser file? Could anyone show me a quick example?

Thanks in advance !

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 10, 2018, 6:29pm UTC](https://discuss.elastic.co/t/parse-the-same-input-in-two-different-ways/147999/2 "2018-09-10T18:29:05Z")

</div>

Have a look at the clone filter.

---

<div class="post-metadata">

**Author:** ![DanV](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@DanV](https://discuss.elastic.co/u/DanV)\
**Post date:** [September 10, 2018, 9:07pm UTC](https://discuss.elastic.co/t/parse-the-same-input-in-two-different-ways/147999/3 "2018-09-10T21:07:09Z")

</div>

Yeah, that's what i needed! Thanks!

---

<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:** [October 8, 2018, 9:07pm UTC](https://discuss.elastic.co/t/parse-the-same-input-in-two-different-ways/147999/4 "2018-10-08T21:07:20Z")

</div>

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