From aee949f1ed56869436b002f132ee95725f0fce0d Mon Sep 17 00:00:00 2001 From: paulfantom Date: Mon, 6 May 2024 11:20:35 +0200 Subject: [PATCH] apps/monitoring: change pushover notification title --- .../manifests/alertmanager/configTemplate.yaml | 9 +++++---- apps/monitoring/raw/alertmanager-config.yaml.gtpl | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/monitoring/manifests/alertmanager/configTemplate.yaml b/apps/monitoring/manifests/alertmanager/configTemplate.yaml index b71919d00..098bfe8b0 100644 --- a/apps/monitoring/manifests/alertmanager/configTemplate.yaml +++ b/apps/monitoring/manifests/alertmanager/configTemplate.yaml @@ -99,13 +99,14 @@ data: token: {{ .pushover_token }} {{/* This is a reference to a secret stored in doppler */}} retry: 10m device: McAir + url: '{{ `{{ (index .Alerts 0).GeneratorURL }}` }}' priority: '{{ `{{ if eq .Status "firing" }}` }}0{{ `{{ else }}` }}-1{{ `{{ end }}` }}' title: | - {{ `{{- if eq .Status "firing" -}}` }} - Firing {{ `{{ .Alerts.Firing | len }}` }} + {{ `{{- if .CommonAnnotations.summary -}}` }} + {{ .CommonAnnotations.summary }} {{ `{{- else -}}` }} - Resolved {{ `{{ .Alerts.Resolved | len }}` }} - {{ `{{- end }}` }} - {{ `{{ .CommonAnnotations.summary }}` }} + {{ .CommonLabels.alertname }} + {{ `{{- end }}` }} message: >- {{ `{{- if .CommonAnnotations.message }}` }} {{ `{{ .CommonAnnotations.message }}` }} diff --git a/apps/monitoring/raw/alertmanager-config.yaml.gtpl b/apps/monitoring/raw/alertmanager-config.yaml.gtpl index 3e79a81f0..f957018d6 100644 --- a/apps/monitoring/raw/alertmanager-config.yaml.gtpl +++ b/apps/monitoring/raw/alertmanager-config.yaml.gtpl @@ -96,13 +96,14 @@ receivers: token: {{ .pushover_token }} {{/* This is a reference to a secret stored in doppler */}} retry: 10m device: McAir + url: '{{ `{{ (index .Alerts 0).GeneratorURL }}` }}' priority: '{{ `{{ if eq .Status "firing" }}` }}0{{ `{{ else }}` }}-1{{ `{{ end }}` }}' title: | - {{ `{{- if eq .Status "firing" -}}` }} - Firing {{ `{{ .Alerts.Firing | len }}` }} + {{ `{{- if .CommonAnnotations.summary -}}` }} + {{ .CommonAnnotations.summary }} {{ `{{- else -}}` }} - Resolved {{ `{{ .Alerts.Resolved | len }}` }} - {{ `{{- end }}` }} - {{ `{{ .CommonAnnotations.summary }}` }} + {{ .CommonLabels.alertname }} + {{ `{{- end }}` }} message: >- {{ `{{- if .CommonAnnotations.message }}` }} {{ `{{ .CommonAnnotations.message }}` }}