apiVersion: v1
data: {}
kind: Secret
metadata:
  name: alertmanager-main
  namespace: monitoring
type: Opaque
stringData:
  alertmanager.yaml: |-
    global:
      resolve_timeout: 5m
    inhibit_rules:
    - equal:
      - namespace
      - alertname
      source_match:   # 当此告警发生，其他的告警被抑制
        severity: critical
      target_match_re:  # 被抑制的对象
        severity: warning|info
    receivers:
    - name: webhook
      webhook_configs:
      - send_resolved: true
        url: "http://webhook-dingtalk.monitoring.svc:8060/dingtalk/webhook/send"
    route:
      group_by:
      - alertname
      group_interval: 30s
      group_wait: 30s
      repeat_interval: 1h
      receiver: webhook
