mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Fix for mixed ping plugin config (#4316)
With this, the "ipv4 vs ipv6" will be respected, and the count is respected too. Signed-off-by: Alex W Baulé <alexwbaule@gmail.com>
This commit is contained in:
@@ -313,7 +313,8 @@
|
||||
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping') and OPNsense.telegraf.input.ping == '1' %}
|
||||
[[inputs.ping]]
|
||||
method = "exec"
|
||||
method = "native"
|
||||
ipv4 = true
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping_hosts') and OPNsense.telegraf.input.ping_hosts != '' %}
|
||||
urls = [{{ "'" + ("','".join(OPNsense.telegraf.input.ping_hosts.split(','))) + "'" }}]
|
||||
{% endif %}
|
||||
@@ -324,8 +325,8 @@
|
||||
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping6') and OPNsense.telegraf.input.ping6 == '1' %}
|
||||
[[inputs.ping]]
|
||||
method = "exec"
|
||||
binary = "ping6"
|
||||
method = "native"
|
||||
ipv6 = true
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping6_hosts') and OPNsense.telegraf.input.ping6_hosts != '' %}
|
||||
urls = [{{ "'" + ("','".join(OPNsense.telegraf.input.ping6_hosts.split(','))) + "'" }}]
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user