普罗米修斯时间戳

ctp*_*ctp 6 timestamp prometheus

我写了一个导出器,它在指标旁边公开时间戳,例如:

test_load_min{app="web01"} 1 1483228810000
test_load_min{app="db01"} 2 1483228820000
test_load_min{app="email01"} 3 1483228830000
Run Code Online (Sandbox Code Playgroud)

根据https://prometheus.io/docs/instrumenting/exposition_formats/这对 Prometheus 应该没问题,但在 Prometheus UI 中查询 test_load_min 返回空结果。同样没有时间戳也能正常工作。有人知道那里有什么问题吗?

Con*_*orB 5

时间戳1483228810000转换回今年一月。

如果执行查询的时间戳与最近的样本相距 5 分钟以上,则 Prometheus 会从查询结果中省略时间序列。

也不建议以这种方式使用时间戳。