-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(inputs.directory_monitor): Traverse sub-directories #11773
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a user configurable setting to not change behaviour for current users?
For example, me and possibly other users drop the finished files into a "done" directory in the same main directory. With this new feature, that would mean these files will be read again and again after updating and not changing any configurations..
Edit: Your suggested "recurse=true/false" sounds good to me. (I would have uses "recursive", not sure what is better)
PS: This feature would be useful for me as well!
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks for looking into it @sspaink!
@sspaink one question, do the options |
Your right those options don't work with paths, but just the names of the files. So it should work for a file in a sub-directory if you just provide its name. |
Yeah, but the names are the same, so only based on name it isn't possible to distinguish |
resolves #11718
resolves https://github.com/influxdata/feature-requests/issues/441
This resolves a feature request to have the input plugin
directory_monitor
also process sub-directories. This does change the default behavior, I suppose this could be a breaking change? Not sure if this would be a problem for users? I could add a configuration flag but the best idea I have for this is a boolean flag called "recurse=true/false", so if you think a config option should be required be happy to hear suggestions.edit: This feature has been put behind the boolean configuration option "recursive" to make this behavior optional