# File pattern for prospect paths

**URL:** <https://discuss.elastic.co/t/file-pattern-for-prospect-paths/66196>\
**Category:** Beats\
**Created:** [November 16, 2016, 4:19am UTC](https://discuss.elastic.co/t/file-pattern-for-prospect-paths/66196 "2016-11-16T04:19:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivas\_Chamarthi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/srinivas_chamarthi/32/8729_2.png) [@Srinivas\_Chamarthi](https://discuss.elastic.co/u/Srinivas_Chamarthi)\
**Post date:** [November 16, 2016, 4:19am UTC](https://discuss.elastic.co/t/file-pattern-for-prospect-paths/66196/1 "2016-11-16T04:19:33Z")

</div>

Hi,

I want to use the following regex for a prospect path pattern "/logs/_/_/[a-zA-Z]+.log"

for any log files with application.log or error.log but not "application\_12333.log" files.

but somehow I don't see any of the files are harvested with the given path.

can someone tell me whats the right regex for filebeat 5.0 ?

thx  
srinivas

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [November 16, 2016, 4:47am UTC](https://discuss.elastic.co/t/file-pattern-for-prospect-paths/66196/2 "2016-11-16T04:47:23Z")

</div>

The glob patterns are not full regular expressions. See docs for the [`Match`](https://golang.org/pkg/path/filepath/#Match). You could use the [`exclude_files`](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-filebeat-options.html#exclude-files) option to ignore certain patterns.

So something like `paths: ['/logs/*/*/*.log']` and `exclude_files: ['_[\d]+\.log$']` should work.

---

<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 7, 2016, 4:19am UTC](https://discuss.elastic.co/t/file-pattern-for-prospect-paths/66196/3 "2016-12-07T04:19:36Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
