mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-08-30 19:29:19 +02:00
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.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user