Prometheus:向客户端发送数据?

Prometheus : Sending data to the client?

在使用 Prometheus 的系统中,我只想向客户端发送一些配置值。 Prometheus有没有办法给客户端传递参数?

在您的抓取配置中,您可以设置 params 属性:

# Optional HTTP URL parameters.
params:
  [ <string>: [<string>, ...] ]

示例:/metrics?property=1

 params:
      property: ['1']

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config