I am trying to use the secrets store plugin to encrypt plaintext passwords and I am failing to do so.
I can set the password in store, check that it is present there, but when I test configuration (with --test flag) then I get TOML parsing error
This is the line I am trying put into the configuration auth_password = @{local_secrets:mysnmpuser}
also tried this without success: auth_password = @local_secrets:mysnmpuser
My main configuration file has the secret store configured properly in this way:
[[secretstores.os]]
id = "local_secrets"
Test shows that secrets are loaded properly during startup phase.
Please help me create proper configuration string to fetch password from os secret store.
When I try to list secrets from command line it all succeeds:
# telegraf secrets list
2023/02/13 10:55:26 I! Using config file: /etc/telegraf/telegraf.conf
2023/02/13 10:55:26 I! Using config file: /etc/telegraf/telegraf.conf
Known secrets for store "local_secrets":
mysnmp
mysnmp_priv
mysnmp_protocol
When I put plaintext passwords then it all works.
Interesting thing is that when I try to use priv protocol variable from secrets store, then it also fails, but with different error: