# Filebeat: Collecting a Single-Line File that Gets Overwritten

**URL:** <https://discuss.elastic.co/t/filebeat-collecting-a-single-line-file-that-gets-overwritten/380601>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 30, 2025, 5:46pm UTC](https://discuss.elastic.co/t/filebeat-collecting-a-single-line-file-that-gets-overwritten/380601 "2025-07-30T17:46:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clashley](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@clashley](https://discuss.elastic.co/u/clashley)\
**Post date:** [July 30, 2025, 5:46pm UTC](https://discuss.elastic.co/t/filebeat-collecting-a-single-line-file-that-gets-overwritten/380601/1 "2025-07-30T17:46:31Z")

</div>

Our application write a single line to a file that gets updated while it runs. It's purpose is to track file openings and closings - the idea being that at the end of the run, if it's not 0, there's a problem.

I am trying to collect this file's contents with filebeat so we can see when it changes. I know it's now how filebeat is designed to run, but I've been experimenting with different setttings like resend\_on\_touch and close.reader.on\_eof to see if I can get it do do what I want. Does anyone have any suggestons?

Thanks
