# Exclude files from wildcard path

**URL:** <https://discuss.elastic.co/t/exclude-files-from-wildcard-path/35580>\
**Category:** Beats\
**Created:** [November 25, 2015, 3:45pm UTC](https://discuss.elastic.co/t/exclude-files-from-wildcard-path/35580 "2015-11-25T15:45:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danieljamesscott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danieljamesscott/32/47151_2.png) [@danieljamesscott](https://discuss.elastic.co/u/danieljamesscott)\
**Post date:** [November 25, 2015, 3:45pm UTC](https://discuss.elastic.co/t/exclude-files-from-wildcard-path/35580/1 "2015-11-25T15:45:27Z")

</div>

Hi,

Is it possible to exclude files which would otherwise be included in a filebeat path?

i.e. I want to include all files in a directory (`/var/log/apps/*`), but exclude those that have been rotated and zipped (`*.gz`)

Previously, I was using logstash as an 'agent' to send logs to the server, and it was simple to do this with the 'file' input plugin, but I can't see how to do this with filebeat

Thanks,

Dan

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [November 26, 2015, 8:51am UTC](https://discuss.elastic.co/t/exclude-files-from-wildcard-path/35580/2 "2015-11-26T08:51:46Z")

</div>

I cannot think of a good way to do that currently. Can you open an issue in [github](https://github.com/elastic/filebeat/issues) so we track this as an enhancement request, please?

---

<div class="post-metadata">

**Author:** ![danieljamesscott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danieljamesscott/32/47151_2.png) [@danieljamesscott](https://discuss.elastic.co/u/danieljamesscott)\
**Post date:** [November 27, 2015, 11:30am UTC](https://discuss.elastic.co/t/exclude-files-from-wildcard-path/35580/3 "2015-11-27T11:30:32Z")

</div>

OK, thanks. Done:

[https://github.com/elastic/filebeat/issues/298](https://github.com/elastic/filebeat/issues/298)

---

<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 5, 2017, 9:57pm UTC](https://discuss.elastic.co/t/exclude-files-from-wildcard-path/35580/4 "2017-07-05T21:57:56Z")

</div>


