From ee7868fa9324cc58988d2a678a920fb6cade89b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20W=2E=20Baul=C3=A9?= Date: Tue, 22 Oct 2024 02:33:46 -0300 Subject: [PATCH] Fix for mixed ping plugin config (#4316) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With this, the "ipv4 vs ipv6" will be respected, and the count is respected too. Signed-off-by: Alex W Baulé --- .../service/templates/OPNsense/Telegraf/telegraf.conf | 7 ++++--- 1 file changed, 4 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..9b227e71a 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 @@ -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 %}