mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Fix in ping telegraf plugin, the "count" to be a "arguments". (#4359)
its the correct way to configure ping to use the "binary" file. (the "count" is a parameter passed to the ping binary).
This commit is contained in:
@@ -318,19 +318,19 @@
|
||||
urls = [{{ "'" + ("','".join(OPNsense.telegraf.input.ping_hosts.split(','))) + "'" }}]
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping_count') and OPNsense.telegraf.input.ping_count != '' %}
|
||||
count = {{ OPNsense.telegraf.input.ping_count }}
|
||||
arguments = ["-4", "-c", "{{ OPNsense.telegraf.input.ping_count }}"]
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping6') and OPNsense.telegraf.input.ping6 == '1' %}
|
||||
[[inputs.ping]]
|
||||
method = "exec"
|
||||
binary = "ping6"
|
||||
binary = "ping"
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping6_hosts') and OPNsense.telegraf.input.ping6_hosts != '' %}
|
||||
urls = [{{ "'" + ("','".join(OPNsense.telegraf.input.ping6_hosts.split(','))) + "'" }}]
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping6_count') and OPNsense.telegraf.input.ping6_count != '' %}
|
||||
count = {{ OPNsense.telegraf.input.ping6_count }}
|
||||
arguments = ["-6", "-c", "{{ OPNsense.telegraf.input.ping6_count }}"]
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user