v-m/alertmanager-ntfy: Add labels to notifications
Just having the alert name and group name in the ntfy notification is not enough to really indicate what the problem is, as some alerts can generate notifications for many reasons. In the email notifications AlertManager sends by default, the values (but not the keys) of all labels are included in the subject, so we will reproduce that here.etcd
parent
aedd4df9f6
commit
d5bfdaca25
|
@ -19,6 +19,9 @@ ntfy:
|
|||
{{ else -}}
|
||||
{{ index .Labels "alertname" }}
|
||||
{{ index .Labels "alertgroup" }}
|
||||
{{ range $key, $value := .Labels -}}
|
||||
{{ if not (eq $key "alertname" "alertgroup") }}{{ $value }} {{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
description: |
|
||||
{{ index .Annotations "description" }}
|
||||
|
|
Loading…
Reference in New Issue