溫馨提示×

prometheus熱加載配置的步驟是什么

小億
180
2024-03-16 14:50:42
欄目: 智能運維

  1. 打開 Prometheus 配置文件 prometheus.yml
  2. 在文件中添加要熱加載的配置文件的路徑,例如:
remote_write:
  - url: "http://localhost:9090/write"
    bearer_token: "exampletoken"
remote_read:
  - url: "http://localhost:9090/read"
    bearer_token: "exampletoken"
  1. 保存 prometheus.yml 文件
  2. 重新加載 Prometheus 配置,可以通過發(fā)送 SIGHUP 信號給 Prometheus 進程來實現(xiàn),例如:
kill -HUP [pid]
  1. Prometheus 將會重新加載配置,包括熱加載的配置文件。

0