Prometheustargetmissing

韵味老鸟 2024-08-08 16:35:18

一:目标消失

Prometheus target missing - alert: PrometheusTargetMissing expr: up == 0 for: 0m labels: severity: critical annotations: summary: Prometheus target missing (instance {{ $labels.instance }}) description: "A Prometheus target has disappeared. An exporter might be crashed.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"

expr: up == 0

表示某个目标消失了,需要观察和关注影响

二:Prometheus all targets missing

- alert: PrometheusAllTargetsMissing expr: sum by (job) (up) == 0 for: 0m labels: severity: critical annotations: summary: Prometheus all targets missing (instance {{ $labels.instance }}) description: "A Prometheus job does not have living target anymore.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"

expr: sum by (job) (up) == 0

表示 某个job所有的target消失了

可以针对job{key=value},进行标签的细分组

0 阅读:0