Telegraf inputs.exec custom scripts

The file
contains section in the end:

{% if influxdb_configured is vyos_defined %}
commands = [
“{{ custom_scripts_dir }}/”,
“{{ custom_scripts_dir }}/”,
“{{ custom_scripts_dir }}/”
timeout = “10s”
data_format = “influx”
{% endif %}

Can you tell what the condition “if influxdb_configured is vyos_defined” means? I have influxdb configured but this section is not present in /run/telegraf/telegraf.conf.
What would be the best way to add my custom script to inputs.exec section of telegraf configuration ?

If you don’t have this section it maybe bug
I’ll check later
Which version?
Did you check it with the latest rolling?

Thank you, @Viacheslav, that has been already resolved. I put custom telegraf config to /etc/telegraf/telegraf.d and my custom script to /etc/telegraf/custom_scripts. That works fine.

@aserkin By the way I created a bug report T4747

1 Like