# How make filebeat harvest not end of file

**URL:** <https://discuss.elastic.co/t/how-make-filebeat-harvest-not-end-of-file/252369>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 16, 2020, 4:28pm UTC](https://discuss.elastic.co/t/how-make-filebeat-harvest-not-end-of-file/252369 "2020-10-16T16:28:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_Perez1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicolas_perez1/32/77152_2.png) [@Nicolas\_Perez1](https://discuss.elastic.co/u/Nicolas_Perez1)\
**Post date:** [October 16, 2020, 4:28pm UTC](https://discuss.elastic.co/t/how-make-filebeat-harvest-not-end-of-file/252369/1 "2020-10-16T16:28:28Z")

</div>

hi, i have a application what write in the last line information incomplete and i need how make filebeat read one line before the end of file.  
this is a problem the application re write the last line

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [October 16, 2020, 6:06pm UTC](https://discuss.elastic.co/t/how-make-filebeat-harvest-not-end-of-file/252369/2 "2020-10-16T18:06:45Z")

</div>

Hmmm, interesting problem! I'm not sure there's a good way to make Filebeat not read the last line. However, is there something about the last line that indicates that it's incomplete? If so, maybe you can use this unique property of the last line to filter it out using Filebeat's `exclude_lines` option: [https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-exclude-lines](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-exclude-lines)?

---

<div class="post-metadata">

**Author:** ![Nicolas\_Perez1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicolas_perez1/32/77152_2.png) [@Nicolas\_Perez1](https://discuss.elastic.co/u/Nicolas_Perez1)\
**Post date:** [October 16, 2020, 6:33pm UTC](https://discuss.elastic.co/t/how-make-filebeat-harvest-not-end-of-file/252369/3 "2020-10-16T18:33:58Z")

</div>

I dont cant see anything, I did view this whit make "cat -ETn" in the log file, and view empy caracter in the last line and after other insercion I view this line whit information.  
I triaid whit "exclude\_lines" and nothing

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4af7d194e55a8e24ec275e2033511babd11142db.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/b/4b5da231c6c099f32dce816de10f1bf5f0345ab1.png)

---

<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:** [November 13, 2020, 8:34pm UTC](https://discuss.elastic.co/t/how-make-filebeat-harvest-not-end-of-file/252369/4 "2020-11-13T20:34:07Z")

</div>

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