# Filters in a Distributed Logstash Setup

**URL:** <https://discuss.elastic.co/t/filters-in-a-distributed-logstash-setup/38663>\
**Category:** Logstash\
**Created:** [January 7, 2016, 5:56pm UTC](https://discuss.elastic.co/t/filters-in-a-distributed-logstash-setup/38663 "2016-01-07T17:56:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lethalMango](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@lethalMango](https://discuss.elastic.co/u/lethalMango)\
**Post date:** [January 7, 2016, 5:56pm UTC](https://discuss.elastic.co/t/filters-in-a-distributed-logstash-setup/38663/1 "2016-01-07T17:56:05Z")

</div>

I've recently inherited the following setup to manage:

Logstash (Collector) -\> Redis -\> Logstash Indexer -\> Elasticsearch

I can see a number of filters on the collector instances as well as the indexers. Am I correct in thinking these filters should all be on the indexer so the collectors simply receive logs on an input and push them into Redis as an output?

Am I likely to break anything if I merge the collector filters into the indexer filters, some of which I can see is duplicated at present?

---

<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:** [January 7, 2016, 6:16pm UTC](https://discuss.elastic.co/t/filters-in-a-distributed-logstash-setup/38663/2 "2016-01-07T18:16:43Z")

</div>

> I can see a number of filters on the collector instances as well as the indexers. Am I correct in thinking these filters should all be on the indexer so the collectors simply receive logs on an input and push them into Redis as an output?

Yes, I prefer keeping the leaf instances dumb and doing as much filtering as possible on the central instances.

> Am I likely to break anything if I merge the collector filters into the indexer filters, some of which I can see is duplicated at present?

I think there's a good chance that you'll be okay, but it obviously depends on your filters.

Shameless plug: This could be a good excuse for looking into [GitHub - magnusbaeck/logstash-filter-verifier](https://github.com/magnusbaeck/logstash-filter-verifier) as a way of testing your full set of filters.

---

<div class="post-metadata">

**Author:** ![lethalMango](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@lethalMango](https://discuss.elastic.co/u/lethalMango)\
**Post date:** [January 7, 2016, 8:20pm UTC](https://discuss.elastic.co/t/filters-in-a-distributed-logstash-setup/38663/3 "2016-01-07T20:20:38Z")

</div>

Perfect thank you for the advice.

> [@magnusbaeck](#):
>
> Shameless plug: This could be a good excuse for looking into [GitHub - magnusbaeck/logstash-filter-verifier](https://github.com/magnusbaeck/logstash-filter-verifier) as a way of testing your full set of filters.

Certainly seems to answer a lot of my questions - I'll check it out.

---

<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:16am UTC](https://discuss.elastic.co/t/filters-in-a-distributed-logstash-setup/38663/4 "2017-07-06T05:16:26Z")

</div>

Closed on July 6, 2017, 5:16am UTC


