# Path setting for rolling files

**URL:** <https://discuss.elastic.co/t/path-setting-for-rolling-files/62656>\
**Category:** Beats\
**Created:** [October 10, 2016, 6:39pm UTC](https://discuss.elastic.co/t/path-setting-for-rolling-files/62656 "2016-10-10T18:39:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidL](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@DavidL](https://discuss.elastic.co/u/DavidL)\
**Post date:** [October 10, 2016, 6:39pm UTC](https://discuss.elastic.co/t/path-setting-for-rolling-files/62656/1 "2016-10-10T18:39:47Z")

</div>

Hi, I'm trying to decide for path setting, whether I should be specifying the exact file using the current file name or should I set it as a glob pattern using wild card. For exmaple: if I know my log file name is mylog.log, when rotated, mylog.log.1, mylog.log.2 etc. are created. for path, should I specify:

/mylog.log

or

/mylog.\*

to make sure I don't lose any files. It seems both work for me right now, but in production where more data come in, I want to make sure I have all the log records.

Thanks!

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [October 11, 2016, 12:11pm UTC](https://discuss.elastic.co/t/path-setting-for-rolling-files/62656/2 "2016-10-11T12:11:48Z")

</div>

As usual, it depends on your use case. If you choose `.*` pattern and start filebeat, also the old files are sent the first time. I see this is as kind of expected so in general I recommend the `.*` option. If you use all the default `close_*` options you should be save in both cases not the loose any data.

---

<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:** [October 31, 2016, 6:39pm UTC](https://discuss.elastic.co/t/path-setting-for-rolling-files/62656/3 "2016-10-31T18:39:59Z")

</div>

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