# Logstash - Detect Filebeat EOF

**URL:** <https://discuss.elastic.co/t/logstash-detect-filebeat-eof/84975>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 8, 2017, 7:51pm UTC](https://discuss.elastic.co/t/logstash-detect-filebeat-eof/84975 "2017-05-08T19:51:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Conall\_Prendergast](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@Conall\_Prendergast](https://discuss.elastic.co/u/Conall_Prendergast)\
**Post date:** [May 8, 2017, 7:51pm UTC](https://discuss.elastic.co/t/logstash-detect-filebeat-eof/84975/1 "2017-05-08T19:51:26Z")

</div>

Hi,

Is it possible for logstash to detect an EOF in one of the Filebeat files.  
So for my application I store some information in a custom plugin and I want it to be flushed when filebeat reaches EOF.

Can filebeat send some kind of event to logstash when it finished a file? Sort of loke an AT command?

Cheers

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [May 9, 2017, 9:51am UTC](https://discuss.elastic.co/t/logstash-detect-filebeat-eof/84975/2 "2017-05-09T09:51:55Z")

</div>

All events look currently the same. In case LS knows the file size, offset + content bytes == filesize would mean it is the last event. But I assume LS does not know the filesize ☹

---

<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 6, 2017, 10:01am UTC](https://discuss.elastic.co/t/logstash-detect-filebeat-eof/84975/3 "2017-06-06T10:01:39Z")

</div>

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