I have a file input plugin configured as below. The first time I ran Logstash with this configuration, I think it read the files in question and created an index. Subsequently, it definitely has not.
A similar configuration without the file_completed_action definitely did work, but it also deletes the files after reading them, by default. That is not what I wanted, so hence the need to add an explicit file_completed_action as log, and so also the file_completed_log_path.
I suspect that the problem lies in the logic of not reading files that have already been read. Note that I have file_completed_log_path configured below. That file is empty though.
The behaviour here is as though the plugin "knows" that it has read the files in question. I can't, though, see which configuration/log file, where, has the list of files that this plugin thinks it has read already. It does not appear to be the file configured as file_completed_log_path, as that file is empty.
I have tried touching the files in question, to see if a date change would trigger a read, but that did not seem to make any difference either.
I know that the files are not being read as there is no index corresponding to those files.
Yes, it does. It saves state in the "sincedb". This is maintained in-memory and peristed to sincedb_path. If you want the state reset every time you restart logstash then set
First of all, thank you, and apologies for the delay in following up. I think that this suggestion did make a difference, but I am still seeing unexpected behaviour.
Yes, the mode is 'read' though, so it should just read the files and get on with it. What I am seeing does not make sense. I am still missing something I suspect.
I am also a bit baffled that it is so tricky to just read some files. This seems like a core use case for Logstash/ES, but it is proving to be much harder than I expected.
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.