# How to configure filebeat to grab today's file from a directory where many files have a name like access.log-yyyy.mm.dd

**URL:** <https://discuss.elastic.co/t/how-to-configure-filebeat-to-grab-todays-file-from-a-directory-where-many-files-have-a-name-like-access-log-yyyy-mm-dd/136552>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 19, 2018, 6:22pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-to-grab-todays-file-from-a-directory-where-many-files-have-a-name-like-access-log-yyyy-mm-dd/136552 "2018-06-19T18:22:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lserranov](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lserranov](https://discuss.elastic.co/u/lserranov)\
**Post date:** [June 19, 2018, 6:22pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-to-grab-todays-file-from-a-directory-where-many-files-have-a-name-like-access-log-yyyy-mm-dd/136552/1 "2018-06-19T18:22:27Z")

</div>

Hello,

I have a directory with many files with name as in this format: access.log-yyyy.mm.dd Example:

1278720 Jun 9 23:59 access.log-2018.06.09  
1337590 Jun 10 23:59 access.log-2018.06.10  
12797116 Jun 11 23:59 access.log-2018.06.11  
84921728 Jun 12 23:59 access.log-2018.06.12

There are many of these files from previous months. I'm interested on configuring filebeat to every day pay attention only to current file. Example, today is 6/19/2018 and I would like filebeat paying attention only to file access.log-2018.06.19 and ignoring the rest.

Is that possible?

I do not want to remove older files so that filebeat starts from clean today. Neither I want filebeat to parse old files as I'm not interested in processing older logs.

Please advise  
Thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 19, 2018, 7:02pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-to-grab-todays-file-from-a-directory-where-many-files-have-a-name-like-access-log-yyyy-mm-dd/136552/2 "2018-06-19T19:02:24Z")

</div>

You can use the [ignore\_older](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-ignore-older) configuration parameter to ignore older files.

---

<div class="post-metadata">

**Author:** ![lserranov](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lserranov](https://discuss.elastic.co/u/lserranov)\
**Post date:** [June 20, 2018, 5:10pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-to-grab-todays-file-from-a-directory-where-many-files-have-a-name-like-access-log-yyyy-mm-dd/136552/3 "2018-06-20T17:10:11Z")

</div>

Many thanks @Christian_Dahlqvist for the advise!!

---

<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 18, 2018, 5:10pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-to-grab-todays-file-from-a-directory-where-many-files-have-a-name-like-access-log-yyyy-mm-dd/136552/4 "2018-07-18T17:10:12Z")

</div>

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