【问题标题】:Ignore prometheus alertmanager inhibit rule忽略 prometheus alertmanager 禁止规则
【发布时间】:2021-11-09 13:27:10
【问题描述】:

我有以下禁止规则:

######## 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% 的时间都按预期工作,但是,一些成员希望他们的受监控设备忽略禁止规则。

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

if label ignore_inhibit is true

do not inhibit

else

proceed as planned

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

【问题讨论】:

    标签: prometheus prometheus-alertmanager


    【解决方案1】:

    使用以下禁止规则:

    inhibit_rules:
    - source_match:
        severity: 'critical'
      target_matchers:
        matchers: [ severity = warning, ignore_inhibit != true ]
      equal: ['alertname', 'instance', 'url']
    

    【讨论】:

      猜你喜欢
      • 2021-11-23
      • 2015-04-02
      • 1970-01-01
      • 2016-02-03
      • 2022-07-26
      • 2021-07-13
      • 2020-10-27
      • 1970-01-01
      • 2023-03-25
      相关资源
      最近更新 更多