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

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

You can use the ignore_older configuration parameter to ignore older files.

Many thanks @Christian_Dahlqvist for the advise!!

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