extractors:
  component: "{{ with .CommonLabels.component }}{{ . }}{{ end }}"
  provider_type: "{{ with .Alerts}}{{ (index . 0).Labels.provider_type }}{{ end }}"
  summary: "{{.GroupLabels.alertname}}"

prechecks:
  - match:
      summary: ^(PDClusterFrequentlyRestart|TiKVClusterFrequentlyRestart|TiDBClusterFrequentlyRestart|TiFlashClusterFrequentlyRestart|TiDBServerFrequentlyRestart|TiKVServerFrequentlyRestart|PDServerFrequentlyRestart|TiFlashServerFrequentlyRestart)$
    source: event
    params:
      eventNames: "PauseCluster|configchange:start|ModifyClusterSize|CreateCluster|ResumeCluster|MaintenanceTask|ApplyClusterConfig"
      durationSecond: 1800
      priority: "Major"
      fake: true
  - match:
      summary: PDDiscoverDownStore
    source: event
    params:
      eventNames: PauseCluster|CreateCluster|ResumeCluster
      durationSecond: 1800
      priority: "Major"
      fake: true
  - match:
      summary: ^TestAlert
    source: api
    params:
      api: 'https://ox7rdo7xielgpd65ecrkne5zeq0hiwbp.lambda-url.us-west-1.on.aws/'