Closed alexwbaule closed 1 week ago
One more thing.
the configuration is "mixed", the count is used only on "native", so the "ping" is eternal on this plugin.
I will do a PR.
Sorry to reopen this issue. After the PR linked to it was merged I upgraded, and started seeing errors like the ones above. The fix suggested here (https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ping#linux-permissions) is to allow CAP_NET_RAW permissions, but this is aimed a Linux implementations.
Testing as root does not cause the issue and manually reverting the file to 'exec' instead of 'native' worked as well (though that does lead to the original issue, of course).
How can I allow the telegraf binary to be executed with the relevant permissions, and how can that be standardized on plugin install/upgrade for other users that run into this?
Hi @myadoran , i dont get errors like this, on normal situation, Only if there is a "ipv4 vs ipv6" resolution, like a hostname has a ipv6 and i force it to resolve in ipv4.
@myadoran , as a test, do it in your opnsense box, on a terminal (ssh into your opnsense).
ping
Both commands respond ok ? with ping...
Both commands do run, but as my network has no IPv6 connectivity I just get the error "no route to host". Same with using ping6 instead of ping -6.
I'll keep searching!
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
Configuring a "ping" on telegraf/input has some miss config itens about ipv4 and ipv6.
i will try to explain:
The ping and ping6 is the same binary on OPNSense (14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 stable/24.7-n267855-304cf693716 SMP amd64)
like is showing here:
The telegraf configuration for ipv4 or ipv6 is simple, just changing the "binary" on ipv6 config, to ping6. But, its the same binary, and the correct flag to use ipv4 or ipv6 is not used. (call ping with -4 or -6).
if no flag is passed, the ping will sometimes get IPV6 response. (i think)
like is showing here:
The telegraf.conf
To Reproduce
Just set a ping input with a DNS
Expected behavior
telegraf ping must follow the correct config, following the documentation from telegraf. (https://github.com/influxdata/telegraf/blob/master/plugins/inputs/ping/README.md)
Describe alternatives you considered
Force the configuration specified ipv4 or ipv6 on config. like this:
Using the "native" implementation, use the "go" internal telegraf implementation. (recommended)
Screenshots
If applicable, add screenshots to help explain your problem.
Relevant log files
If applicable, information from log files supporting your claim.
Additional context
Add any other context about the problem here.
Environment
Software version used and hardware type if relevant, e.g.:
14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 stable/24.7-n267855-304cf693716 SMP amd64