global:
  slack_api_url: 'https://hooks.slack.com/services/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'

route:
  group_by: ['alertname', 'severity', 'instance']
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 4h
  receiver: 'slack-default'

receivers:
- name: 'slack-default'
  slack_configs:
  - channel: '#server-status'
    send_resolved: true
    title: '{{ if eq .Status "firing" }}🚨{{ else }}✅{{ end }} {{ .GroupLabels.alertname }} ({{ .GroupLabels.severity }})'
    text: |-
      {{ if eq .Status "firing" }}*🔥 Problem Detected*{{ else }}*✅ Problem Resolved*{{ end }}
      {{ range .Alerts }}
      *Alert:* {{ .Labels.alertname }}
      *Summary:* {{ .Annotations.summary }}
      *Details:* {{ .Annotations.description }}
      *Instance:* {{ .Labels.instance }}{{ if .Labels.container }} ({{ .Labels.container }}){{ end }}
      {{ end }}
      *Severity:* {{ .CommonLabels.severity }}

      *Links:*
      • <https://grafana.ai-impress.com|Grafana>
      • <https://prometheus.ai-impress.com|Prometheus>
    color: '{{ if eq .Status "firing" }}{{ if eq .CommonLabels.severity "critical" }}danger{{ else }}warning{{ end }}{{ else }}good{{ end }}'
