如何将每个请求的响应时间反馈到Prometheus Pushgateway?

时间:2019-08-15 12:30:19

标签: prometheus

我需要通过pushgateway方法将度量标准数据(每个API请求的响应时间)输入到Prometheus中。想法是将这些响应时间在源服务器上缓存两分钟,然后通过一个单个HTTP调用将所有这些指标发送到Pushgateway。

HTTP主体应如何显示?

我尝试了以下操作但未成功:

# TYPE request_routing_time summary
request_routing_time{basePath="/myApi1"} 3.0
request_routing_time{basePath="/myApi1"} 4.0
request_routing_time{basePath="/myApi2"} 3.0
request_routing_time{basePath="/myApi2"} 4.0

我想为每个缓存的API请求添加一行,但这似乎不起作用。 在一次通过pushgateway调用发送许多请求的指标之前,我的缓存想法可能吗?

0 个答案:

没有答案