# Filebeat config to read current log only

**URL:** <https://discuss.elastic.co/t/filebeat-config-to-read-current-log-only/225442>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 27, 2020, 3:43pm UTC](https://discuss.elastic.co/t/filebeat-config-to-read-current-log-only/225442 "2020-03-27T15:43:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![manikandanb87](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@manikandanb87](https://discuss.elastic.co/u/manikandanb87)\
**Post date:** [March 27, 2020, 3:43pm UTC](https://discuss.elastic.co/t/filebeat-config-to-read-current-log-only/225442/1 "2020-03-27T15:43:32Z")

</div>

Hi Team,  
I have file beat cofigured on one of my machine and it is configured to send the feed to logstash.

The thing is, I want my files to be read depending on todays date. My log files are getting generated in the format - Mylog\_0411.Log.  
Mylog\_=\>Log file name  
04=\>Month  
11=\>Date

So, How can I restrict file beat to read/tail the current file(todays file) log only.

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:** [March 29, 2020, 2:01pm UTC](https://discuss.elastic.co/t/filebeat-config-to-read-current-log-only/225442/2 "2020-03-29T14:01:18Z")

</div>

Have you tried configuring [ignore\_older](https://www.elastic.co/guide/en/beats/filebeat/7.6/filebeat-input-log.html#filebeat-input-log-ignore-older) so older files are skipped?

---

<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:** [April 26, 2020, 2:01pm UTC](https://discuss.elastic.co/t/filebeat-config-to-read-current-log-only/225442/3 "2020-04-26T14:01:24Z")

</div>

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