Skip to content
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

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Jul 19, 2024

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

  • No AI generated code was used in this PR

Related issues

fixes: #12389
fixes: #12264

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Jul 19, 2024
@powersj powersj self-assigned this Jul 22, 2024
@powersj powersj force-pushed the feat/config-create branch from c6fbdb2 to e5c393a Compare July 23, 2024 14:15
powersj added 2 commits July 24, 2024 12:01
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
@powersj powersj force-pushed the feat/config-create branch from e5c393a to 4900613 Compare July 24, 2024 18:02
@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jul 24, 2024
@powersj powersj marked this pull request as ready for review July 24, 2024 18:03
@powersj powersj assigned DStrand1 and srebhan and unassigned powersj Jul 24, 2024
@telegraf-tiger
Copy link
Contributor

Copy link
Member

@srebhan srebhan left a 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.

@srebhan srebhan removed their assignment Jul 25, 2024
@DStrand1 DStrand1 merged commit 777154b into influxdata:master Jul 25, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.32.0 milestone Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
3 participants