首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >忽略prometheus alertmanager禁止规则

忽略prometheus alertmanager禁止规则
EN

Stack Overflow用户
提问于 2021-09-14 10:57:58
回答 1查看 269关注 0票数 0

我有以下抑制规则:

代码语言:javascript
复制
######## INHIBIT RULES ########
# Inhibit Rules: https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule
inhibit_rules:
- source_match:
    severity: 'critical'
  target_match:
    severity: 'warning'
  # Apply inhibition if the alertname is the same on the same host.
  equal: ['alertname', 'instance', 'url']
###############################

这项工作99%的时间是预期的,然而,一些成员希望他们的被监控设备忽略抑制规则。

有没有办法将标签添加到这些目标/规则,以便:

代码语言:javascript
复制
if label ignore_inhibit is true

do not inhibit

else

proceed as planned

(我知道如何添加标签,但如果可能,我不知道如何让alertmanagere忽略该标签)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-09-14 12:16:35

使用以下inhibit_rules:

代码语言:javascript
复制
inhibit_rules:
- source_match:
    severity: 'critical'
  target_matchers:
    matchers: [ severity = warning, ignore_inhibit != true ]
  equal: ['alertname', 'instance', 'url']
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69176475

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档