-
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
Use go-ping for "native" execution in Ping plugin #8679
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.
🤝 ✅ CLA has been signed. Thank you!
!signed-cla |
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.
🤝 ✅ CLA has been signed. Thank you!
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.
I have two minor comments (see code) and one regarding the "name-resolve test". It seems like before the test was checking for name-resolution errors but now it seems you are testing exactly the opposite... Could you please comment on that!
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.
You now removed the resolution test completely!? @ssoroka has to decide if this is ok or not. :-)
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.
needs some changes. ping me
Removed dns failure check, 3rd parties libary responsibility
Update tests
This pull request introduces 1 alert when merging 22af2ef into d41569c - view on LGTM.com new alerts:
|
I just tried this nightly build, now when using native and i ping a IP which permanently down . i get no errors in the debug logs for telegraf, and i have uploaded a screenshot of the influxdb ping content. Running on windows 2016 |
He did in #8704 |
(cherry picked from commit c237989)
* Use go-ping for "native" execution in Ping plugin * Check for ipv6 and deadline out of go func * ensure dns failure * Move interval and timeout calc to init Removed dns failure check, 3rd parties libary responsibility * Rename timeout to avoid conflict * Move native ping to interface Update tests * Check for zero length
Required for all PRs:
Updated the
input plugin Ping
to use the package go-ping when using "native" in the configuration. I believe this improves code readability without breaking any backwards compatible functionality. I was having 100% packet loss with the original implementation that I couldn't resolve even after providing the correct permissions as specified in the README, using the new implementation solved this problem for me. Moving all the implementation details to go-ping should help with future maintenance of this plugin.This might help address the following issues: