Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有普罗米修斯查询=sum by (job) (rate(http_requests_total[5m]))
sum by (job) (rate(http_requests_total[5m]))
你能告诉我如何在 grafana 中创建警报当值等于零(长于给定时间)
我找不到合适的功能
假设您希望在 5m 平均值为零超过 5 分钟时触发警报:
如果您不喜欢,is below 0.01可以将查询转换为布尔值,如下所示:
is below 0.01
sum by (job) (rate(http_requests_total[5m])) == bool 0
现在,如果比率为 0,您将得到 a 1,如果比率不为 0,您将得到 0。
1