温馨提示:本文翻译自stackoverflow.com,查看原文请点击:prometheus - AlertManager downtime alert unless 429 (To Many Requests) HTTP status code
prometheus prometheus-alertmanager prometheus-blackbox-exporter

prometheus - AlertManager停机警报,除非429(对于许多请求)HTTP状态码

发布于 2020-03-27 11:52:28

目前,我有一个AlertManager配置,它仅在“ probe_success”指标为0 时发送警报

我不知道如何将警报规则的“ ”字段中的probe_http_status_code度量与“ probe_success”度量结合起来,expr以防止probe_success由于429(到许多请求)HTTP而导致度量值为0 时触发警报。状态码。

我想使用下面的类似问题来解决这个问题,但是没有运气。
如何在Prometheus查询中“联接”两个指标?

probe_success”和“ probe_http_status_code”都是Blackbox Exporter指标。

查看更多

查看更多

提问者
Julian v.d Berkmortel
被浏览
315
brian-brazil 2019-07-04 21:34

您可能想要的是valid_status_codes,因此您可以指定429(加上任何预期的2xx代码)为有效,probe_success当它们发生时将保持为1。