{%- if values.commands is defined %} | |
[[inputs.exec]] | |
commands = {%- if values.commands is list %}{{ values.commands|json }}{%- else %}[ "{{ values.commands }}" ]{%- endif %} | |
{%- if values.timeout is defined %} | |
timeout = "{{ values.timeout }}" | |
{%- endif %} | |
{%- if values.interval is defined %} | |
interval = "{{ values.interval }}" | |
{%- endif %} | |
data_format = "{{ values.data_format|default('influx') }}" | |
{%- include 'telegraf/files/input/_filters.conf' %} | |
{%- endif %} |