# Common filter(s) for multiple pipelines?

**URL:** <https://discuss.elastic.co/t/common-filter-s-for-multiple-pipelines/150889>\
**Category:** Logstash\
**Created:** [October 3, 2018, 12:30pm UTC](https://discuss.elastic.co/t/common-filter-s-for-multiple-pipelines/150889 "2018-10-03T12:30:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![boots18](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@boots18](https://discuss.elastic.co/u/boots18)\
**Post date:** [October 3, 2018, 12:30pm UTC](https://discuss.elastic.co/t/common-filter-s-for-multiple-pipelines/150889/1 "2018-10-03T12:30:23Z")

</div>

I have multiple pipelines feeding into logstash (metricbeat, filebeat, winlogbeat, etc.) and each of them share some common filters. I am wondering if there is a way to have some filters in a location that each of the pipelines can access so I don't need to have the filters copied in every single pipeline.

Is this possible? Is there any way at all to have common filters reused by multiple pipelines?

---

<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:** [October 3, 2018, 6:41pm UTC](https://discuss.elastic.co/t/common-filter-s-for-multiple-pipelines/150889/2 "2018-10-03T18:41:08Z")

</div>

There's nothing built-in for this but you can simply symlink your configuration files into the various directories where you want them.

---

<div class="post-metadata">

**Author:** ![boots18](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@boots18](https://discuss.elastic.co/u/boots18)\
**Post date:** [October 5, 2018, 2:06pm UTC](https://discuss.elastic.co/t/common-filter-s-for-multiple-pipelines/150889/3 "2018-10-05T14:06:52Z")

</div>

I ended up using pipeline-to-pipeline communication and also using conditional logic in the "Output" section of my pipeline. You can include multiple "Inputs" perform the same filters on all of those inputs and then use conditional logic in the output section to distribute each event to the desired index or to another pipeline. Hope this helps anyone with a similar question.

---

<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:** [November 2, 2018, 2:06pm UTC](https://discuss.elastic.co/t/common-filter-s-for-multiple-pipelines/150889/4 "2018-11-02T14:06:52Z")

</div>

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