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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion net-mgmt/telegraf/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PLUGIN_NAME= telegraf
PLUGIN_VERSION= 1.8.2
PLUGIN_VERSION= 1.8.3
PLUGIN_COMMENT= Agent for collecting metrics and data
PLUGIN_DEPENDS= telegraf
PLUGIN_MAINTAINER= [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,31 @@
</field>
<field>
<id>input.ping</id>
<label>Ping</label>
<label>Ping (IPv4)</label>
<type>checkbox</type>
<help>Ping Hosts and measure the metrics.</help>
<help>Ping Hosts using IPv4 and measure the metrics.</help>
</field>
<field>
<id>input.ping_hosts</id>
<label>Ping Hosts</label>
<label>Ping Hosts (IPv4)</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>Set the Hosts to ping in a CSV list.</help>
<help>Set the Hosts to ping using IPv4 in a CSV list.</help>
</field>
<field>
<id>input.ping6</id>
<label>Ping (IPv6)</label>
<type>checkbox</type>
<help>Ping Hosts using IPv6 and measure the metrics.</help>
</field>
<field>
<id>input.ping6_hosts</id>
<label>Ping Hosts (IPv6)</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>Set the Hosts to ping using IPv6 in a CSV list.</help>
</field>
<field>
<id>input.haproxy</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
<ping_hosts type="CSVListField">
<Required>N</Required>
</ping_hosts>
<ping6 type="BooleanField">
<default>0</default>
<Required>N</Required>
</ping6>
<ping6_hosts type="CSVListField">
<Required>N</Required>
</ping6_hosts>
<haproxy type="BooleanField">
<default>0</default>
<Required>N</Required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,21 @@

{% if helpers.exists('OPNsense.telegraf.input.ping') and OPNsense.telegraf.input.ping == '1' %}
[[inputs.ping]]
method = "exec"
{% if helpers.exists('OPNsense.telegraf.input.ping_hosts') and OPNsense.telegraf.input.ping_hosts != '' %}
urls = [{{ "'" + ("','".join(OPNsense.telegraf.input.ping_hosts.split(','))) + "'" }}]
{% endif %}
{% endif %}

{% if helpers.exists('OPNsense.telegraf.input.ping6') and OPNsense.telegraf.input.ping6 == '1' %}
[[inputs.ping]]
method = "exec"
binary = "ping6"
{% if helpers.exists('OPNsense.telegraf.input.ping6_hosts') and OPNsense.telegraf.input.ping6_hosts != '' %}
urls = [{{ "'" + ("','".join(OPNsense.telegraf.input.ping6_hosts.split(','))) + "'" }}]
{% endif %}
{% endif %}

{% if helpers.exists('OPNsense.telegraf.input.haproxy') and OPNsense.telegraf.input.haproxy == '1' %}
[[inputs.haproxy]]
servers = ["socket:/var/run/haproxy.socket"]
Expand Down