# How can filebeat collect logs current date?

**URL:** https://discuss.elastic.co/t/how-can-filebeat-collect-logs-current-date/363754
**Category:** Beats
**Tags:** filebeat
**Created:** [July 25, 2024, 3:54am UTC](https://discuss.elastic.co/t/how-can-filebeat-collect-logs-current-date/363754 "2024-07-25T03:54:48Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [July 26, 2024, 1:54pm UTC](https://discuss.elastic.co/t/how-can-filebeat-collect-logs-current-date/363754/6 "2024-07-26T13:54:55Z")

</div>

Leandro told you main point of FB is the feature: _ignore\_older_. Maybe you can use the script processor to drop events if they are not matched by timestemp or date in the directory path.

What you can consider is to involve LS which more powerful for data transformation, where is easy to add a control mechanism to drop all events which are not from today's directory.

There is also the age LS plugin, which was discussed on the [topic](https://discuss.elastic.co/t/drop-events-older-than-three-days/83423) however it's based on the timestamp field not directory.

---

_[View the full topic](https://discuss.elastic.co/t/how-can-filebeat-collect-logs-current-date/363754)._
