繁体   English   中英

向Prometheus公开多个指标

[英]Expose multiple metrics to Prometheus

[普罗米修斯]你好!

我想使用Prometheus的相应时间戳公开多个指标,例如:

test5 {job_name =“ test05”} 15 1512982800000 test5 {job_name =“ test05”} 10 1512986400000 test5 {job_name =“ test05”} 6 1512990000000 test5 {job_name =“ test05”} 20 1512990840000 test5 {job_name =“ test05”} 25 1512993000000

test6 {job_name =“ test06”} 2 1512987840000 test6 {job_name =“ test06”} 3 1512991500000 test6 {job_name =“ test06”} 4 1512991800000 test6 {job_name =“ test06”} 5 1512991920000 test6 {job_name =“ test06”} 6 1512992220000 test6 {job_name =“ test06”} 6 1512996000000 test6 {job_name =“ test06”} 7 1512996240000

test7 {job_name =“ test07”} 1 1512909840000

test8 {job_name =“ test08”} 2 1510317840000

但是,Prometheus仅抓取时间戳记比当前时间短一小时的指标。 为什么?

谢谢!

虽然度量标准格式建议在度量标准端点中包含时间戳,但Prometheus的官方立场似乎是不支持/不鼓励使用此功能(参考1-4)。

尽管我找不到支持它的证据,但我会推测Prometheus对于给定的key [label]集仅采用最新的指标。 这可以通过使用不同的job_name标签值进行测试来验证,以观察在将值视为唯一度量标准值时是否存储了这些值。

这可能是Prometheus当前形式无法满足的要求,并且额外的批量api仍将在3年后实施。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM