net-mgmt/telegraf: Add ping6 input #2029
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Many months ago I discovered that Telegraf's ping input plugin doesn't work for IPv6 on OPNsense (and FreeBSD in general).
I fixed the general FreeBSD problems in this pull request for Telegraf, which is included since release 1.15.3.
OPNsense also needs some changes to make use of the fixed Telegraf.
Changes
Added another checkbox to enable a second instance of the ping input for IPv6, and a list box where one can specify the IPv6 hosts, to the GUI.
This second instance has
binary = "ping6"
set intelegraf.conf
.Both the IPv4 and the IPv6 instances also explicitly set
method = "exec"
, since there's a chance that the ping input plugin will move tomethod = "native"
in the future, which wouldn't work without changes (if at all?) on FreeBSD, because it needs raw ICMP sockets:More info can be found in the README for the ping input plugin.
Testing
I've tested these changes on my main OPNsense router, and they seem to work fine with a replaced
telegraf
binary.