influxdata/telegraf

Add retry feature for http secret-store plugin

Open

#15,846 建立於 2024年9月5日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Go (4,161 fork)batch import
feature requesthelp wantedsize/l

倉庫指標

Star
 (9,892 star)
PR 合併指標
 (平均合併 2天 12小時) (30 天內合併 136 個 PR)

描述

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

  • API call setup : Use @ variable
  • API connection failure : Retry

Actual behavior

  • API call setup : Use @ variable
  • API connection failure : service down ( The reason is that the @ variable does not have a value and attempts to connect in an unsubstituted state.)

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"

貢獻者指南