【问题标题】:Alert manager triggers web-hook repeatedly for same alertAlertmanager 为相同的警报重复触发 webhook
【发布时间】:2021-04-27 11:29:26
【问题描述】:

我已将警报管理器规则配置为在 Prometheus 指标从 0 变为 1 时触发警报 它会在指标从 0 更改为 1 时触发 webhook 警报 但是警报管理器不断触发 webhook,为相同的指标更改重复警报。

是否有防止警报管理器进一步发出警报的配置?

下面是我的警报管理器配置

global:
  resolve_timeout: 15m
  http_config: {}
  smtp_hello: localhost
  smtp_require_tls: true
route:
  receiver: web.hook
  group_by:
  - ccu_code
receivers:
- name: web.hook
  webhook_configs:
  - send_resolved: true
    http_config: {}
    url: http://service:8080/alarms
    max_alerts: 0
templates: []

【问题讨论】:

    标签: prometheus prometheus-alertmanager


    【解决方案1】:

    您会收到这些重复警报,因为 AlertManager 具有以下设置:

    # How long to wait before sending a notification again if it has already
    # been sent successfully for an alert. (Usually ~3h or more).
    [ repeat_interval: <duration> | default = 4h ]
    

    https://prometheus.io/docs/alerting/latest/configuration/

    我认为这样设计的原因是您希望不断收到有关活动问题的通知,以防您忘记处理它等等。

    【讨论】:

      猜你喜欢
      • 2021-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多