-
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
Support a native ping #2833
Comments
Continuing from discussion here: #2830 (comment)
Well as long as we keep external ping an option, the only drawback I see is having 2 code paths. |
Adding support for an internal ping sounds fine. What if we got rid of external ping, is it even a possiblility? Managing the differences between platforms is quite difficult. @sparrc Do you think it would make sense to use your library? |
You could do it but I don't think it's ever been tested on windows, and requires additional configuration on linux. The That, or you could potentially give telegraf that capability by default, although I'm not sure what the other consequences of that would be. |
An other problem is the current implementation does not support internationalisation. It only works on English OS, Windows and Linux included. |
That's a good point, maybe we could run ping with LANG=C as a stopgap? |
Feature Request
Proposal:
It would be nice if telegraf could perform a ping natively instead of having to call out to the external
ping
utility. This could be accomplished by using either CAP_NET_RAW or ICMP sockets. Telegraf could do a one-time probe at start to determine whether either of the two are functional, and fall back to externalping
if not.CAP_NET_RAW has the advantage that it can be set by the package during installation, and not require manual setup by the user. The disadvantage is that it's limited to Linux.
ICMP sockets are functional on Linux & FreeBSD, but require manual setup by the user on Linux (not sure about FreeBSD).
Current behavior:
Telegraf calls external
ping
utlity.Desired behavior:
Telegraf sends ICMP echo request & reads ICMP echo response itself.
Use case:
For systems which send a large number of pings, such as probing a large number of devices, or sending pings at a high rate, or both, the external ping utility can be a drain on resources.
The text was updated successfully, but these errors were encountered: