From 9f6679c0432666d64c9d9555df6446a4be8ca9f5 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 26 Aug 2026 13:42:37 -0400 Subject: [PATCH] Use argv arrays for telegraf inputs.exec commands Telegraf 1.39 deprecated bare string entries in inputs.exec commands and will drop them in 1.45, warning on every start: W! DeprecationWarning: Value "/scripts/esindexsize.sh" for option "command" of plugin "inputs.exec" deprecated since version 1.39.0 Each entry is now a single-element argv array. Array form skips shell parsing, which is fine here: every command is a bare script path from telegraf's scripts list, no args or shell metacharacters. --- salt/telegraf/etc/telegraf.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/salt/telegraf/etc/telegraf.conf b/salt/telegraf/etc/telegraf.conf index 93d0e71b3..ae1b83084 100644 --- a/salt/telegraf/etc/telegraf.conf +++ b/salt/telegraf/etc/telegraf.conf @@ -335,7 +335,7 @@ {%- do TELEGRAFMERGED.scripts[GLOBALS.role.split('-')[1]].remove('sostatus.sh') %} [[inputs.exec]] commands = [ - "/scripts/sostatus.sh" + ["/scripts/sostatus.sh"] ] data_format = "influx" timeout = "15s" @@ -346,7 +346,7 @@ [[inputs.exec]] commands = [ {%- for script in TELEGRAFMERGED.scripts[GLOBALS.role.split('-')[1]] %} - "/scripts/{{script}}"{% if not loop.last %},{% endif %} + ["/scripts/{{script}}"]{% if not loop.last %},{% endif %} {%- endfor %} ] data_format = "influx" @@ -375,7 +375,7 @@ {%- if GLOBALS.is_manager or GLOBALS.role == 'so-heavynode' %} [[ inputs.exec ]] commands = [ - "/scripts/esindexsize.sh" + ["/scripts/esindexsize.sh"] ] data_format = "influx" interval = "1h"