Skip to content
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

net-mgmt/telegraf: Add ping6 input #2029

Merged
merged 1 commit into from
Jan 23, 2021

Conversation

DasSkelett
Copy link
Contributor

@DasSkelett DasSkelett commented Sep 13, 2020

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 in telegraf.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 to method = "native" in the future, which wouldn't work without changes (if at all?) on FreeBSD, because it needs raw ICMP sockets:

This plugin has two main methods of operation: exec and native. The recommended method is native, which has greater system compatibility and performance. However, for backwards compatibility the exec method is the default.
When using method = "native" a ping is sent and the results are reported in native Go by the Telegraf process, eliminating the need to execute the system ping command.
When using method = "native", Telegraf will attempt to use privileged raw ICMP sockets.

More info can be found in the README for the ping input plugin.

Testing

grafik

I've tested these changes on my main OPNsense router, and they seem to work fine with a replaced telegraf binary.

@DasSkelett
Copy link
Contributor Author

With Telegraf 1.15.3 in the ports now, this pull request would be ready to go.

@fichtner fichtner self-assigned this Jan 22, 2021
Copy link
Member

@mimugmail mimugmail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I installed the branch and it works fine, thanks! :)
Sorry for the delay, this is what happens when you also read github notification on a mobile, totally forgot this one, sorry.

@fichtner fichtner merged commit 85d6a3a into opnsense:master Jan 23, 2021
@fichtner
Copy link
Member

Merged, thanks a lot ❤️

andreas-stuerz pushed a commit to andreas-stuerz/plugins that referenced this pull request Feb 2, 2021
windgmbh pushed a commit to windgmbh/opnsense-plugins that referenced this pull request Feb 4, 2021
@DasSkelett DasSkelett deleted the feature/telegraf-ping6 branch February 24, 2022 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants