global:
  resolve_timeout: 5m

route:
  group_by: ['alertname', 'job', 'instance', 'port', 'severity']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 8760h
  receiver: 'email-prometheusalert'
  routes:
    - match_re:
        severity: .+
      receiver: 'email-prometheusalert'
      continue: true
    - match_re:
        severity: .+
      receiver: 'db-webhook-only'
      continue: true

receivers:
  - name: 'email-prometheusalert'
    webhook_configs:
      - url: 'http://10.150.117.190:9094/prometheusalert?type=email&tpl=prometheus-email&email=hans.wang@ptn.advantest.com'
        send_resolved: true
      # MySQL入库接口（旧PHP方案注释保留）
#      - url: "http://10.150.117.190:8080/api/webhook.php"
#        send_resolved: true

  - name: 'db-webhook-only'
    webhook_configs:
      - url: "http://10.150.117.190:909/alert"
        send_resolved: true
