# Filebeat: Read the whole file every X regardless if it has changed or not

**URL:** <https://discuss.elastic.co/t/filebeat-read-the-whole-file-every-x-regardless-if-it-has-changed-or-not/87909>\
**Category:** Beats\
**Created:** [June 1, 2017, 12:38pm UTC](https://discuss.elastic.co/t/filebeat-read-the-whole-file-every-x-regardless-if-it-has-changed-or-not/87909 "2017-06-01T12:38:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elvarb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elvarb/32/44840_2.png) [@elvarb](https://discuss.elastic.co/u/elvarb)\
**Post date:** [June 1, 2017, 12:38pm UTC](https://discuss.elastic.co/t/filebeat-read-the-whole-file-every-x-regardless-if-it-has-changed-or-not/87909/1 "2017-06-01T12:38:17Z")

</div>

I have a few "state" files that change every now and then but I would like Filebeat to read each file either when it changes or every X, and not just read the latest line but read the whole file.

What complicates things is that sometimes the file contains two lines and sometimes one line so I have to use the multiline filter as well.

What is the best way to go about doing this?

---

<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:** [June 22, 2017, 12:49pm UTC](https://discuss.elastic.co/t/filebeat-read-the-whole-file-every-x-regardless-if-it-has-changed-or-not/87909/2 "2017-06-22T12:49:16Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
