-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to file
source to exclude older files
#10005
Comments
Supporting this issue. Just because when you are file watching log file like Test*.log file when we have too many files on directory like Test-1.log, Test-2.log ... a live file is always a incremented number appended down the road we will have too many Test-xxx.log files in the directory but in theory only 1 live log file. at this case all files are scanned for watch list and getting too many open file issue. Some how Vector need to have knowledge to understand live file only watch as old files have no activity for long time. |
Yeah, I need to close the file handler when a file is not active, avoid too many opened files limit. |
Any update on this @c-hui |
This is impacting me too, I have a syslog server that has thousands of log files and vector keeps files open that it's not reading from. |
Meet the same problem, the description of |
If you have a single log file that is written to, and rotated periodically (but still matches the
include
list), it would be nice to allow Vector to not open a file-watcher on the older files. The number of files that are watched can easily exceed the file limit in this scenario.The
ignore_older_secs
config option initially seems like it would solve this issue, but this only controls where in a file Vector starts reading from. (If it's older than the setting, it just reads from the end so it only gets new logs). A new setting to completely exclude old files from being watched could be useful.The text was updated successfully, but these errors were encountered: