mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net-mgmt/telegraf: Add ping6 input (#2029)
This commit is contained in:
@@ -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= m.muenz@gmail.com
|
||||
|
||||
+18
-4
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user