# Filebeat is not reading updated logfile

**URL:** <https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 20, 2016, 10:54pm UTC](https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379 "2016-06-20T22:54:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![andressa](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@andressa](https://discuss.elastic.co/u/andressa)\
**Post date:** [June 20, 2016, 10:54pm UTC](https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379/1 "2016-06-20T22:54:07Z")

</div>

Hello, we are using ELK stack and we are trying to read a .log file and pass that log information to our elasticsearch so we can manipulate it on Kibana. To do that we decided to use Filebeat, but we encountered an inconsistency, whenever a new line is added to our .log file that is being listened by filebeat, it's not being updated in our logstash server,

We have logging on debug level and we noticed that when the log file is updated, a "Flushed Event" is fired, but it is always equal to 0, as the example below:  
[https://gist.github.com/andressa/5ea3b5de41758dccd6c0d879f7b3bfb0](https://gist.github.com/andressa/5ea3b5de41758dccd6c0d879f7b3bfb0)

Also, here is the filebeat.yml content:  
[https://gist.github.com/andressa/37eee6cba8765b369e6a60f46e2087ed](https://gist.github.com/andressa/37eee6cba8765b369e6a60f46e2087ed)

---

<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:** [June 21, 2016, 11:45am UTC](https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379/2 "2016-06-21T11:45:11Z")

</div>

Can you share some details on how you update the log file and the version of filebeat?

---

<div class="post-metadata">

**Author:** ![andressa](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@andressa](https://discuss.elastic.co/u/andressa)\
**Post date:** [June 21, 2016, 1:04pm UTC](https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379/3 "2016-06-21T13:04:58Z")

</div>

Sure =)

we are updating the file manually, inserting lines like this:  
[https://gist.github.com/andressa/ca380c7d7137244bfb7de343489d4f82](https://gist.github.com/andressa/ca380c7d7137244bfb7de343489d4f82)

Filebeat version is **1.2.3**

Thank you in advance for helping.

---

<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:** [June 21, 2016, 1:47pm UTC](https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379/4 "2016-06-21T13:47:26Z")

</div>

This could be an issue with the editor. Can you try:

```auto
echo 'your-content-here' >> logfile.txt

```

Check if that brings the expected behaviour.

---

<div class="post-metadata">

**Author:** ![andressa](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@andressa](https://discuss.elastic.co/u/andressa)\
**Post date:** [June 21, 2016, 2:07pm UTC](https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379/5 "2016-06-21T14:07:18Z")

</div>

Hey, @ruflin, thank you very much!

It worked fine! =)

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:** [June 21, 2016, 2:07pm UTC](https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379/6 "2016-06-21T14:07:45Z")

</div>

The issue is that some editors do not update the modified time before the file is closed ...

---

<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:** [July 11, 2016, 10:54pm UTC](https://discuss.elastic.co/t/filebeat-is-not-reading-updated-logfile/53379/7 "2016-07-11T22:54:19Z")

</div>

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