I am working on the filebeat 1.1.1. The following is the snippet of the configuation file. I assume the filebeat reads from the end of the log files as the 'tail_files' is true. But it seems the filebeat doesn't work as I thought. Any idea of this?
The access.log is 30 days old, when I start the filebeat for the first time, I notice the filebeat read all the lines of the log file. I assume the filebeat reads the only new lines that are created after the filebeat is started.
That is indeed not expected. Could it be that you started filebeat before without having tail_files set and that a registrar file was generated? Can you do the following?
Stop filebeat
Remove the registry file
Start filebeat with the -e -d "*" option
Please provide the the output from your console here.
Hi ruflin,
You are right, I start the filebeat with tailf_files set before.
I make a test in another server which doesn't have filebeat installed before. The filebeat read from end the of log file as I expect.
Thank you.
I cannot get the tail feature to work on linux - i've tried removing the .filebeat registry file and restarting with tail option = true . It doesn't read the log entries a i enter them . - I have run with the -e -d "*" options, I see a lot of "not harvesting, file didnt change" even though i'm entering lines into the log.
I cannot get the tail feature to work on linux - i've tried removing the .filebeat registry file and restarting with tail option = true . It doesn't read the log entries a i enter them . - I have run with the -e -d "*" options, I see a lot of "not harvesting, file didnt change" even though i'm entering lines into the log.
if i set tail : false, it reads the entire file again each time i enter a new line in my log file ( including my new line ). That is not the normal behaviour is it ? 9 to re read the entire log file ).
additionally,
I have tried turning tail off ( tail : false )
and restarting, i see the log does pick up the initial lines, but subsequent new lines do not seem to get picked up.
stopped filebeat
removed .filebeat
entered tail : false in filebeat.yml
restart with filebeat -e -d "*"
stop filebeat
remove .filebeat
entered tail : true in filebeat.yml
restart filebeat with ./filebeat -e -d "*"
enter log line via vi command
I see initial log entries are picked up. new lines ( entered using vi ) are not picked up
i figured out the issue - the elastic search output in filebeat.yml was uncommented - therefore it was attempting to use both elasticsearch and logstash as outputs. i commneted out the elasticsearch section and all is working fine now !
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.