# Best practices for exclusions in logstash

**URL:** <https://discuss.elastic.co/t/best-practices-for-exclusions-in-logstash/109625>\
**Category:** Logstash\
**Created:** [November 29, 2017, 4:50pm UTC](https://discuss.elastic.co/t/best-practices-for-exclusions-in-logstash/109625 "2017-11-29T16:50:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfchrisgleason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sfchrisgleason/32/21782_2.png) [@sfchrisgleason](https://discuss.elastic.co/u/sfchrisgleason)\
**Post date:** [November 29, 2017, 4:50pm UTC](https://discuss.elastic.co/t/best-practices-for-exclusions-in-logstash/109625/1 "2017-11-29T16:50:44Z")

</div>

Good afternoon all,

I just had a quick question regarding exclusions or drops in logstash.

I know you can drop specific messages on the input or output in logstash.

I'm wondering what the best practice is for large lists of exclusions? Is there a way to do an include of a list of exclusion statements from an external file, or would you put them all in the syslog input/elasticsearch output?

I.E. if you want to drop messages that contain 1234 you could use:

`if "1234" in [message] { drop { } }`

Can you put a bunch of these in a file, then have logstash include that file as a statement in the input/output?

I.E. include =\> /file/of/drops

My scenario is If I have a syslog/beat client that is particularly noisy is it best practice to add lots of these exclusions, or do people typically do this elsewhere?

Thanks!

Chris

---

<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:** [November 30, 2017, 6:26am UTC](https://discuss.elastic.co/t/best-practices-for-exclusions-in-logstash/109625/2 "2017-11-30T06:26:12Z")

</div>

The translate filter should be useful in this case.

---

<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:** [December 28, 2017, 6:26am UTC](https://discuss.elastic.co/t/best-practices-for-exclusions-in-logstash/109625/3 "2017-12-28T06:26:28Z")

</div>

Closed on December 28, 2017, 6:26am UTC

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