It looks like the indentation of your config file is off a little bit off for close_removed and the options below. Can you correct this? force_close_files is not available anymore in 5.0.
Are the files kept open "forever" or are they closed after close_inactive? How often do you update the files?
It would be nice to see some full log files from filebeat. You can share them in a gist. Be aware that in general it is not recommended to fetch log files from mounted volumes but have filebeat installed on all edge nodes.
Hi Ruflin, apologize for late reply since I moved onto other stuff and with holidays. But I have to look into this one more final time.
I think I see whats going on. Our process actually writes the log files and it rotates the log file once it reaches say 750MB in less than 10 minutes .
then the filebeat reads the logs. I am using lsof -p on the filebeat and I notice that filebeat still holds a reference to the deleted file even though it doesn't exist and never closes .
I am not sure if filebeat is done reading the file completely ( I am assuming its not). I am using close_removed and clean_removed attributes but still it doesn't look like filebeat is releasing the files ever.
I am not sure how to debug this further. Please let me know if there is anything else I can do to avoid this situation.
Best is to have a look at the log lines on what it is stating there. If the harvester is still open / catching up, it explains why the files are still open. In case the output is not blocked, close_removed should still apply as soon as the event is sent. But here it could be that the network drive comes into play and filebeat gets some cached data instead of being notified that it is removed. Note: I don't know the details of NFS mount implementation.
Please have a look at the log files and let me know what you see there. Best with debug level then you should see what is happening (or not).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.