-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathalertmanager.yml
More file actions
47 lines (44 loc) · 1.71 KB
/
alertmanager.yml
File metadata and controls
47 lines (44 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
##
## NOTE!
##
## alertmanager.yml GETS OVERWRITTEN BY INTERPOLATION OF alertmanager.envsubst
## Edit alertmanager.envsubst instead!
##
global:
resolve_timeout: 5m
slack_api_url: 'http://localhost:9093/NO_SLACK_API_URL'
templates: ['/config/templates/*.tmpl']
route:
group_by: ['...']
#group_by: [service_id, service_name, datacenter]
receiver: default-receiver
routes:
- matchers:
- severity=~"warning|critical"
receiver: slack-notifications
receivers:
- name: default-receiver
- name: slack-notifications
slack_configs:
- channel: '#NO_SLACK_CONFIG_CHANNEL'
send_resolved: true
title: '{{ template "slack.title" . }}'
text: '{{ template "slack.text" . }}'
icon_url: https://avatars3.githubusercontent.com/u/3380462
actions:
- type: button
text: 'Alert :bell:'
# link to graph instead of table ;)
url: '{{ (index .Alerts 0).GeneratorURL | reReplaceAll "&g0.tab=1" "&g0.tab=0" }}'
- type: button
text: 'Config :memo:'
url: '{{- if .CommonLabels.service_id -}}https://manage.fastly.com/configure/services/{{ .CommonLabels.service_id }}{{- end -}}'
- type: button
text: 'Dashboard :chart_with_upwards_trend:'
url: '{{- if .CommonLabels.service_id -}}http://localhost:3000/d/nwscINyZk/fastly-service?orgId=1&var-service_id={{ .CommonLabels.service_id }}{{- end -}}'
- type: button
text: 'Dashboard :chart_with_upwards_trend:'
url: '{{- if .CommonLabels.datacenter -}}http://localhost:3000/d/ubXmEIyZz/fastly-top-services?var-datacenter={{ .CommonLabels.datacenter }}{{- end -}}'
- type: button
text: 'Silence :no_bell:'
url: '{{ template "silence.link" . }}'