Skip to content

Commit

Permalink
Merge pull request #975 from alphagov/add-govuk-exporter
Browse files Browse the repository at this point in the history
Add slack alert for mirrors in alertmanager
  • Loading branch information
theseanything authored Oct 27, 2023
2 parents 41d4f50 + b9e2318 commit 9d2a21c
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ alertmanager:
group_interval: 12h
active_time_intervals:
- inhours
- match:
alertname: MirrorFreshnessAlert
receiver: 'slack-mirror-freshness'
repeat_interval: 1d
group_wait: 12h
group_interval: 12h
active_time_intervals:
- inhours
receivers:
- name: 'null'
- name: 'pagerduty'
Expand All @@ -46,6 +54,19 @@ alertmanager:
{{ range .Alerts -}}
• api_user: `{{ .Labels.api_user }}`, application: `{{ .Labels.application }}`
{{ end }}
- name: 'slack-mirror-freshness'
slack_configs:
- channel: '#govuk-platform-engineering'
send_resolved: true
icon_url: https://avatars3.githubusercontent.com/u/3380462
title: |-
[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }}
text: >-
*Description:* {{ .CommonAnnotations.description }}

*Environment:* ${environment}

*Mirror*: {{ $labels.backend }}
time_intervals:
- name: inhours
time_intervals:
Expand Down

0 comments on commit 9d2a21c

Please sign in to comment.