prometheus热加载配置的步骤是什么

544
2024/4/10 14:50:42
栏目: 智能运维
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

  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 配置,可以通过发送 SIGHUP 信号给 Prometheus 进程来实现,例如:
kill -HUP [pid]
  1. Prometheus 将会重新加载配置,包括热加载的配置文件。

辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读: Prometheus如何处理监控数据的归档和清理