# Read the current date file in filebeat

**URL:** <https://discuss.elastic.co/t/read-the-current-date-file-in-filebeat/342726>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 11, 2023, 9:20am UTC](https://discuss.elastic.co/t/read-the-current-date-file-in-filebeat/342726 "2023-09-11T09:20:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Golam\_Rabbi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/golam_rabbi/32/124240_2.png) [@Golam\_Rabbi](https://discuss.elastic.co/u/Golam_Rabbi)\
**Post date:** [September 11, 2023, 9:20am UTC](https://discuss.elastic.co/t/read-the-current-date-file-in-filebeat/342726/1 "2023-09-11T09:20:39Z")

</div>

I have some custom log files for my company. The log file naming pattern is like this "api\_datalogger\_11-09-23". Here 11-09-23 means that the log file of September 11, 2023. Now I want to set my filebeat inputs to read the log file of the current date. Maybe it can use the system date but the date format has to be like this "11-09-23". How can I solve this issue? I tried ignore\_older but did not get anything.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Karthik\_Balaji](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@Karthik\_Balaji](https://discuss.elastic.co/u/Karthik_Balaji)\
**Post date:** [September 11, 2023, 1:56pm UTC](https://discuss.elastic.co/t/read-the-current-date-file-in-filebeat/342726/2 "2023-09-11T13:56:25Z")

</div>

None

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 11, 2023, 2:23pm UTC](https://discuss.elastic.co/t/read-the-current-date-file-in-filebeat/342726/3 "2023-09-11T14:23:43Z")

</div>

Hi @Golam_Rabbi Welcome to the community.

What version are you using.

If the timestamp on the file are correct `ingore_older` should work. Can you share filebeat configuration and a directory listing so we can see

`ls -lrt`

---

<div class="post-metadata">

**Author:** ![Golam\_Rabbi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/golam_rabbi/32/124240_2.png) [@Golam\_Rabbi](https://discuss.elastic.co/u/Golam_Rabbi)\
**Post date:** [September 12, 2023, 5:23am UTC](https://discuss.elastic.co/t/read-the-current-date-file-in-filebeat/342726/4 "2023-09-12T05:23:08Z")

</div>

Hello @stephenb Thanks for your response. I am sharing my filebeat config and directory listing here.  
[Filebeat Configuration](https://imgur.com/a/frsYG8c)  
[Directory Listing](https://imgur.com/f2P1em2)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 12, 2023, 7:08pm UTC](https://discuss.elastic.co/t/read-the-current-date-file-in-filebeat/342726/5 "2023-09-12T19:08:19Z")

</div>

Hi @Golam_Rabbi

Thanks please do not post pictures of text, please paste the text itself

Also apologies but I meant the directory listing of the directory where the logs are getting harvested from.

---

<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 10, 2023, 9:08pm UTC](https://discuss.elastic.co/t/read-the-current-date-file-in-filebeat/342726/6 "2023-10-10T21:08:25Z")

</div>

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