I've been trawling these topics and may have found a couple of issues that sound similar but I can't figure out what the expected behaviour is in the following use case (which seems quite straight forward):
I have some nginx log files that currently don't see a lot of activity and have logrotate set to 1 day. So what happens is this:
I restart filebeat to reset everything
I visit my site and generate some logs
everything is fine and the log entries are shipped to Logstash
I stop visiting my site for a few days
logrotate rotates the logs at the normal time
After 24 hours (default ignore_older setting) I see the File reading error. Stopping harvester. Error: Stop harvesting as file is older then ignore_older message in my syslog
I think this is actually from the rotated log file (ie. *access.log.1)
The next log rotation does nothing as the new log file is still empty
I get another File reading error. Stopping harvester. Error: Stop harvesting as file is older then ignore_older message in my syslog
Pretty sure this is for the new empty log file as it's been 24 hours since it was created
a few days later I visit my site again and generate some new log entries
This is what I expect:
Within 10 seconds (the default scan frequency) the log file is seen as having been updated and the harvester starts again
The new log entries are shipped to Logstash and appear in my Kibana view
This is what happens:
Nothing
I waited quite a while and nothing comes through
Other files (eg. syslog) are continuing to be shipped (although configured on a different prospector to differentiate type)
if I restart Filebeat then the harvesters start again and the log entries get shipped
I'm pretty sure this is not the expected behaviour. I considered upping the ignore_older to greater than the logrotate time but then i will also have to configure logrotate to rotate empty files or it'll go wrong anyway
The weirdest thing is the stdin prospector - this is because I use Chef to add prospector files and initially there are no prospectors - Filebeat doesn't like it when you try to start it with no prospectors (I will raise this as a separate issue)
I still have to look more in detail into the problem to see what the issue is. Have a look at the discussion here to see if your case goes under the ignore_older problem here: https://github.com/elastic/filebeat/issues/181
I remember an issue popping up that filebeat stops when there are not prospectors starting. If this is the case, please open an issue.
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.