-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat(inputs.chrony): Add probing #16861
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(inputs.chrony): Add probing #16861
Conversation
This adds the `Probe() error` method to the `inputs.chrony` plugin to allow for startup probing as defined in `/docs/specs/tsd-009-probe-on-startup.md`. A sanity check was done to ensure this does indeed behave as expected when the chrony daemon is not available: ``` 2025-04-22T17:39:14Z I! [agent] Failed to probe inputs.chrony, shutting down plugin: querying sources failed: read udp 127.0.0.1:53811->127.0.0.1:323: read: connection refused ```
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 🥳 This pull request decreases the Telegraf binary size by -3.49 % for linux amd64 (new size: 285.3 MB, nightly size 295.7 MB) 📦 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.
Thanks for the PR @LandonTClipp! Two comments in the code...
Additionally, I think your tests should be improved. You should use the model (see e.g. inputs.nvidia_smi
) and adapt the server to stop after the initial connect by introducing a new option to it that makes the serve
loop exit.
_, err := c.client.Communicate(sourcesReq) | ||
if err != nil { | ||
return fmt.Errorf("querying sources failed: %w", err) | ||
} |
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.
_, err := c.client.Communicate(sourcesReq) | |
if err != nil { | |
return fmt.Errorf("querying sources failed: %w", err) | |
} | |
if _, err := c.client.Communicate(sourcesReq); err != nil { | |
return fmt.Errorf("querying sources failed: %w", err) | |
} |
inputs.chrony
): Add Probe() error
method
You got it, I'll work on improving the tests. |
Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you! |
Summary
This adds the
Probe() error
method to theinputs.chrony
plugin to allow for startup probing as defined in/docs/specs/tsd-009-probe-on-startup.md
.A sanity check was done to ensure this does indeed behave as expected when the chrony daemon is not available:
Checklist
Related issues
resolves #16860
Documentation updates related to: #16859