I am trying to ingest data from log file to elastic via logstash.
Here is the pipeline -> LOG_FILE > FILEBEAT > LOGSTASH > ELASTIC.
Not sure but recently been observing the logs are missing in elastic, upon checking I realized the log ends up in log file but not in the filebeat.
I tested with
Is there any reason to use close_renamed in your case? If the files filebeat is reading are rotated by renaming them, they will be closed before being completely read, take a look to the docs of this option.
Same thing for tail_files. This option will make filebeat to start by the end of a file when opening it.
In combination, both options may make Filebeat to stop reading files too soon, and to ignore the first lines of new files.
I would suggest to try without these options, unless there is some strong reason to use them.
Other things to consider:
Is there any reason to use Logstash in your deployment? You can send events directly from Filebeat to Elasticsearch and this would simplify your deployment.
Consider using the filestream input, that is intended to replace the log input and solves some issues it had.
Hello @jsoriano
Thanks for reaching back, close_renamed I use this because the file gets renamed and moved away while a new file is created with same name as updated in the filebeat.yml. I have seen few cases where Filebeat keeps looking for the old file so using this option.
tail_file : I did try removing this option but ended up with same result.
I am deploying Filestream right now and will keep you posted with new changes.
Hello Jamie,
The attached link is not helping me and here is my observation.
I am seeing logs from account off hours but when I do try in peak hours I see no logs.
This concludes that filebeat is not able to read all the logs. Any inputs on boosting filebeat performance?
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.