feat: Added possibility to detect local config file changes and reload#8529
feat: Added possibility to detect local config file changes and reload#8529vlastahajek wants to merge 1 commit intoinfluxdata:masterfrom
Conversation
fbb0739 to
45ddfcc
Compare
|
Note that you can already do this with --config-directory, as watching for file changes and reloading configuration is the default behavior for that. |
Excluding windows specific changes
|
@vlastahajek do you know how this could be implemented for URL-based configs? This would be really helpful for our cloud customers and address use cases like this: #8730 |
|
@sjwang90, this shouldn't be hard. The question is, what should be default time interval for check to not bother server much? 1 minute? |
Closes #7187
There are situations (e.g. Kubernetes environment, Windows service) when restarting Telegraf due to config changes is cumbersome, and sending SIGHUP signal to achieve that is difficult.
Telegraf watching its config for changes will make this easy.
This PR adds watching for a single local config file only, not config dir or URL .
Watching is made using the
infuxdata/taillib and it is possible to be enabled via cmd optionwatch-configwith two possible values:However, polling from tail needs a fix (influxdata/tail#9) and until the tail is fixed, it is redirected to the fork with a simple fix.
Required for all PRs: