-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathconfig.example.yml
More file actions
51 lines (51 loc) · 1.8 KB
/
Copy pathconfig.example.yml
File metadata and controls
51 lines (51 loc) · 1.8 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
47
48
49
50
51
http:
addr: :8000
auth:
username: "alertmanager"
password: "verysecure"
ntfy:
baseurl: https://ntfy.sh
auth:
basic:
username: "admin"
password: "verysecure"
# OR
token: "verysecureauthtoken"
notification:
# The topic can either be a hardcoded string or a gval expression that evaluates to a string
topic: alertmanager
# true to send all labels as tags, false to only send labels that are explicitly defined in the tags section
convertLabelsToTags: true
# Priority reference: https://docs.ntfy.sh/publish/#message-priority
# Can either be a hardcoded string or a gval expression that evaluates to a string
priority: |
status == "firing" ? "urgent" : "default"
tags:
# Tags with no condition are always included
# Emoji shortcode reference: https://docs.ntfy.sh/emojis/
- tag: "+1"
condition: status == "resolved"
- tag: rotating_light
condition: status == "firing"
templates:
title: |
{{ if eq .Status "resolved" }}Resolved: {{ end }}{{ index .Annotations "summary" }}
description: |
{{ index .Annotations "description" }}
# Add ntfy actions https://docs.ntfy.sh/publish/?h=action#open-websiteapp
actions:
- action: "view"
label: "Dashboard"
url: "{{ .GeneratorURL }}"
condition: 'GeneratorURL != ""'
- action: "view"
label: "Runbook"
url: '{{ index .Annotations "runbook_url" }}'
condition: 'status == "firing" && annotations["runbook_url"] != ""'
headers:
X-Click: |
{{ .GeneratorURL }}
# Whether to forward alerts asynchronously. When enabled, a 202 status code is
# returned immediately. When disabled, forwarding errors result in a 5xx status
# code.
async: false