-
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): Add config check sub-command #15732
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.
Thanks for putting this together so quickly, I do have one comment/question
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.
Thank you very much for taking a look at the flags!
Just too bad there is no documentation about the cli commands anymore 😢 Now we need to download/install the binary and run the help command before we can read about this feature. |
@Hipska the issue with the previous documentation was that it was incorrect and a pain to maintain. If you do have a constructive proposal on how to document this with correctness and maintainability in mind, let me know! |
Something similar as the generation of the plugin README's? Could be just an action in the |
Good call. Please open an issue and describe a bit what needs to be done... Thanks! |
Summary
This PR adds a
telegraf config check
sub-command to check if the configuration is valid and can be successfully parsed. All plugins are initialized to validate options but are NOT started or executed. The sub-command will exit with a non-zero error code if an error occurs and with a zero error-code otherwise.Checklist
Related issues
resolves #15726