timestamp - 普罗米修斯时间戳

标签 timestamp prometheus

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

test_load_min{app="web01"} 1 1483228810000
test_load_min{app="db01"} 2 1483228820000
test_load_min{app="email01"} 3 1483228830000

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

最佳答案

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

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

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

关于timestamp - 普罗米修斯时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43890629/

相关文章:

mysql - 使用 SQL 检查时间戳是否是今天

prometheus - Prometheus 可以管理多少个标签值?

php - 通过回显将日期时间/时间戳从 PHP 传递到 Javascript

javascript - JavaScript 中的时间戳不一致?

perl - 为什么这些时间戳与 Perl Time::HiRes 不一致?

python - pydantic 设置 : TypeError: cannot pickle '_thread.lock' object

monitoring - Prometheus 中的最小 scrape_interval 是多少?

kubernetes - 由于 "unmarshal errors: line 19: field matchers not found in type config.plain",Alertmanager 失败

Alertmanager,不同警报规则的不同间隔

ios - Unix 时间戳在 ios 中始终关闭