Logstash版本
2.4.1
问题
在Logstash中,已经通过logstash-input-file插件导入了一些本地日志文件。现在需要重新导入这些日志文件,但是logstash-input-file插件会自动忽略之前已经读取的文件。要想重新导入之前的文件,只能清空文件监控记录。
那么,文件监控记录到底在哪里?
在官方插件说明文档中,关于文件监控记录(sincedb)的说明:
The plugin keeps track of the current position in each file byrecording it in a separate file named sincedb. Thismakes it possible to stop and restart Logstash and have it pick up where itleft off without missing the lines that were added to the file while Logstashwas stopped
......
By default, the sincedb file is placed in the home directory of the user running Logstash