Secret stores for my config directory

Hello !
I want to use secret store plugins with some config.files.
At first, i use several config files and i want to close user and password, which use into such config.
At second, i use directory config path with --config-directory
I found next documentation: here and here. So i can to make valid config files, but i can’t test it and use.
I use command: telegraf --test --config /my_dir/config/cam.conf secrets set tstore cam_url and create one key, cam_url, diffenetly i can get key value telegraf --test --config /my_dir/config/cam.conf secrets get tstore cam_url, but i can’t test this config, i can’t get error and telegraf do not see my stores if i test my config standart method: telegraf --test --config /my_dir/config/cam.conf or telegraf --config-directory /my_dir/config/ --test

Question:

  • how create several secret stores and keys for config directory
  • how test it
  • and how run config with secret store plugins, where is ts saving, will it keep after reboot?
  • how use keyctl for creating and getting secret keys? perhaps it will be more simple

Here’s how you define multiple secret stores…with the id:
Each secret store requires a unique id that configurations using the secrets can reference.
For example:

[[secretstores.os]]
   id = "mystore"
   keyring = "telegraf"
[[outputs.influxdb_v2]]
  urls = ["http://127.0.0.1:8086"]
  token = "@{mystore:influx_token}"
  organization = "myorg"
  bucket = "mybucket"

I’m not sure how to set multiple and test though. @srebhan might know more details here.

Thanks!