influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.59k stars 5.56k forks source link

Add retry feature for http secret-store plugin #15846

Open YoonSungHyun-Git opened 1 month ago

YoonSungHyun-Git commented 1 month ago

Use Case

Use the scretstore http plugin to retrieve connection information from postgresql output. However, in the current situation, if the secretstore http plugin fails to retrieve the API value, the service does not start because @ variable substitution is not performed.

Expected behavior

Actual behavior

Additional info

[[secretstores.http]]
  id = "meta"
  url = "http://localhost/meta"
  timeout = "5s"

[[outputs.postgresql]]
  connection = "host=@{meta:host} port=@{meta:port} user=@{meta:user} password=@{meta:password} dbname=@{meta:database} sslmode=disable"
srebhan commented 1 month ago

Next steps: Look into code on how to realize this best. We probably cannot error out on startup then and all downstream users of the secret-store need to cope with the fallout. This might take some time...