完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/management_api.html。
Prometheus提供了一套管理API来简化自动化和集成。
健康检查
GET /-/healthy
这个端点总是返回200,应该用来检查Prometheus的健康状况。
就绪检查
GET /-/ready
当Prometheus准备好为流量服务(即响应查询)时,此端点返回200。
重新加载
PUT /-/reload
POST /-/reload
此端点触发重新加载Prometheus配置和规则文件。默认情况下是禁用的,可以通过--web.enable-lifecycle
选项来启用它。
或者,可以通过向Prometheus进程发送一个SIGHUP
信号来触发配置重新加载。
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/management_api.html。