Filebeat is not reading updated logfile


(Andressa) #1

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

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


(ruflin) #2

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


(Andressa) #3

Sure =)

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

Filebeat version is 1.2.3

Thank you in advance for helping.


(ruflin) #4

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

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

Check if that brings the expected behaviour.


(Andressa) #5

Hey, @ruflin, thank you very much!

It worked fine! =)

cheers!


(ruflin) #6

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


(system) #7

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