-
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(agent): Enable watching for new configuration files #15645
Conversation
c6fbdb2
to
e5c393a
Compare
This allows for watching for new files in a configuraiton directory. When a new file is found, Telegraf will reload with that file added to the list of files to watch. Note this will reload when any file, a telegraf config or not, is added to the directory. TODO: test on Windows fixes: influxdata#12389 fixes: influxdata#12264
e5c393a
to
4900613
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.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.
Thanks @powersj! Unfortunately, there is no way to check if the new file actually is a config file so let's continue with this approach.
Summary
This allows for watching for new files in a configuration directory.
When a new file is found, Telegraf will reload with that file added to
the list of files to watch. Note this will reload when any file, a
telegraf config or not, is added to the directory.
Checklist
Related issues
fixes: #12389
fixes: #12264