简体   繁体   English

如果指标停止出现,Prometheus警报会发生什么?

[英]What happens to Prometheus alerts if metrics stop coming?

I have a Prometheus alert like this: 我有这样的普罗米修斯警报:

ALERT etcdNoLeader
    IF etcd_server_has_leader{job="etcd"} == 0
    FOR 1m

What happens if the etcd_server_has_leader metric stops generating data? 如果etcd_server_has_leader指标停止生成数据会怎样? Does the alert fire ? 警报会触发吗? Does it do anything ? 它有什么作用吗?

The alert will stop firing. 警报将停止触发。 You'll generally want an alert on up == 0 and depending on your setup possibly also absent(up) . 通常,您需要在up == 0上发出警报,并且根据您的设置可能也不absent(up)

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

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