-
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 support for input probing #16333
feat(agent): Add support for input probing #16333
Conversation
startup_error_behavior = "probe"
): Add support for input probing.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 @LandonTClipp for the PR! Some minor comments in the code, the most important one is to call Stop
if probing fails to not leak connections or the like.
Blocked on #16364. |
I'm not sure this resolves #15915 as it doesn't add a |
You're right, I changed the verbiage. |
c7bab87
to
84a5bd9
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
@srebhan should be ready for another review. |
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 @LandonTClipp for your contribution!
Could you give some comments on #16052 (review) please? As the spec is not really clear. Also a link to the spec in the PR message would be nice. (https://github.com/influxdata/telegraf/blob/master/docs/specs/tsd-009-probe-on-startup.md) |
So starting from now (and when plugins implement it) Telegraf will need a restart in order for plugins to recover? |
Starting from now, when plugins support it, and startup_error_behavior is set to probe, plugins will indeed be disabled for the lifetime of the process if they fail probing on startup. |
Why would you ever want that and have a plugin only recover when telegraf is restarted? I think I'm missing the use case here.. |
This particular use-case deals with environments running in a public cloud that I am helping to build. We distribute a custom build of Telegraf, along with associated config, that our users Note that this does not affect Telegraf's behavior if the resource existed at process startup but fails at some point after. In that case, Telegraf will continue to retry the plugin endlessly. The PR allows you to describe the case in which you want to assume that a resource will never exist if it doesn't exist at process startup. |
Summary
This PR adds support in
RunningInput
and theAgent
to call an input plugin'sProbe
method if it exists and if the plugin has been configured for probing.Checklist
Related issues
probe
as value tostartup_error_behavior
#16052inputs.nvidia-smi
: Add config option to test a single run of nvidia-smi on plugin startup #15915probe_on_startup
: Add input config and interface similar tostartup_error_behavior
#16028