Hello @Ievhen ,
Unfortunately, I don't believe it is possible to create environment variables for use within Telegraf at this time. I would suggest setting up user permissions such that they cannot view the Telegraf configuration file without authorization. Currently, this means unchecking all permissions.
Also, you will need to prevent accessing the ctrlX OS configuration as the Telegraf configuration is stored here.
There should be an option to allow start/stop/diagnostics without viewing the configuration, so I will submit this to development.
... View more