I am trying to figure out the best approach to keep the file input plugin's sincedb file in sync with the directory where the log files are being read from.
The log files will be rolled daily and archived at the end of the day into a different location. As they are moved I'd like to delete the inode entries of those files from sincedb too. I have to do this as the inode may get reused once the log file is moved
I could run a maintenance script to update the sincedb file during the move of the log files. But I am not sure what random issues I may run into while doing this i.e. file locking of sincedb by both the logstash plugin and the maintenance script.
Is there a better option or approach to this? any pointers will help.