-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.sample.yaml
54 lines (53 loc) · 1.58 KB
/
config.sample.yaml
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
47
48
49
50
51
52
53
54
# SPDX-FileCopyrightText: The matrix-alertmanager-receiver Authors
# SPDX-License-Identifier: GPL-3.0-or-later
http:
port: 12345
matrix:
homeserver-url: https://matrix.example.com
user-id: "@user:matrix.example.com"
access-token: secret
room-mapping:
warnings: !somewhere:example.com
templating:
external-url-mapping:
"alertmanager:9093": https://alertmanager.example.com
computed-values:
- values:
color: white
- values:
color: orange
when-matching-labels:
severity: warning
- values:
color: red
when-matching-labels:
severity: critical
- values:
color: limegreen
when-matching-status: resolved
firing-template: '
<p>
<strong><font color="{{ .ComputedValues.color }}">{{ .Alert.Status | ToUpper }}</font></strong>
{{ if .Alert.Labels.name }}
{{ .Alert.Labels.name }}
{{ else if .Alert.Labels.alertname }}
{{ .Alert.Labels.alertname }}
{{ end }}
>>
{{ if .Alert.Labels.severity }}
{{ .Alert.Labels.severity | ToUpper }}:
{{ end }}
{{ if .Alert.Annotations.description }}
{{ .Alert.Annotations.description }}
{{ else if .Alert.Annotations.summary }}
{{ .Alert.Annotations.summary }}
{{ end }}
>>
{{ if .Alert.Annotations.runbook }}
<a href="{{ .Alert.Annotations.runbook }}">Runbook</a> |
{{ end }}
{{ if .Alert.Annotations.dashboard }}
<a href="{{ .Alert.Annotations.dashboard }}">Dashboard</a> |
{{ end }}
<a href="{{ .SilenceURL }}">Silence</a>
</p>'