Skip to content

Commit

Permalink
apps/monitoring: change pushover notification title
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed May 6, 2024
1 parent fb1c140 commit aee949f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions apps/monitoring/manifests/alertmanager/configTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}` }}
Expand Down
9 changes: 5 additions & 4 deletions apps/monitoring/raw/alertmanager-config.yaml.gtpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}` }}
Expand Down

0 comments on commit aee949f

Please sign in to comment.