我已经将自定义指标推入推网关,prometheus 每15秒就会刮一次。在此之前,我需要获取度量。pushgateway和prometheus都托管在我公司的服务器上,因此无法更改刮取间隔。有任何方法直接从推送网关获取度量吗?
发布于 2022-08-22 12:35:48
您可以在pushgateway的/metrics端点发送GET请求,它将返回所有当前值。
https://github.com/prometheus/pushgateway#query-api
https://stackoverflow.com/questions/58795838
相似问题