From 60b0bfea878473978c0d9ed4c5b10e9cd645dc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20W=2E=20Baul=C3=A9?= Date: Sun, 1 Dec 2024 05:46:03 -0300 Subject: [PATCH] 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). --- .../service/templates/OPNsense/Telegraf/telegraf.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf b/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf index fd5012ae5..f0a9c9311 100644 --- a/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf +++ b/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf @@ -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 %}