Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agent): Watch for deleted files
Currently, the agent will recognize when config files are deleted and then block, waiting for them to re-appear. This will trigger a reload. This is not likely the intended behavior, instead a user wants to remove a configuration and have telegraf remove that configuration from the running Telegraf. Note this only works on watched directories. If a user specifies a specific file to load and then deletes it, Telegraf will fail to start as that file is now missing. In order to avoid any additional error messages on reload, the list of known configs needs to update as well. Therefore, right before the reload we go get a new list of files based on the CLI options + reading any configuration directories.
- Loading branch information