Prometheus-当同一警报严重时,禁止警告警报

时间:2020-09-09 21:32:38

标签: prometheus-alertmanager

我尝试禁止警报,因此严重中的同一警报可以禁止警告警报。 下面的配置没有用...请建议此配置有什么问题。

inhibit_rules:
- source_match:
    alertname: Inhibit
    severity: critical
  target_match:
    severity: warning
    alertname: KubePodNotReady
  equal: ['alertname', 'namespace', 'pod', 'prometheus']

inhibit_rules:
- source_match:
    severity: 'critical'
  target_match:
    severity: 'warning'
  equal: ['alertname', 'namespace', 'pod','prometheus']

1 个答案:

答案 0 :(得分:0)

以下配置适用于我。

inhibit_rules:
 - source_match:
       severity: critical
       alertname: KubePodNotReady
   target_match:
       severity: warning
       alertname: KubePodNotReady
   equal: ['namespace', 'pod', 'prometheus']