当您读取Logstash的输入日志时,Logstash会保留有关此文件上读取位置的记录,这称为sincedb。
Where to write the sincedb database (keeps track of the current position of monitored log files).
The default will write sincedb files to some path matching "$HOME/.sincedb*"
因此,如果要导入旧的日志文件,则必须删除$ HOME中的所有.sincedb *。然后,您需要设置
start_position =>“开始”
在您的配置文件中。
希望这可以帮到你。