fix alertmanager slack

This commit is contained in:
Victor Barba Martin 2021-11-18 10:18:07 +01:00
parent dd387650e8
commit d5f13eaf36
1 changed files with 8 additions and 8 deletions

View File

@ -28,13 +28,13 @@ spec:
channel: '#monitoring-alerts' channel: '#monitoring-alerts'
iconURL: 'https://avatars3.githubusercontent.com/u/3380462' iconURL: 'https://avatars3.githubusercontent.com/u/3380462'
sendResolved: true sendResolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification' title: '[{{"{{"}} .Status | toUpper{{"}}"}}{{"{{"}} if eq .Status "firing"{{"}}"}}:{{"{{"}} .Alerts.Firing | len{{"}}"}}{{"{{"}} end{{"}}"}}] Monitoring Event Notification'
text: >- text: >-
{{ range .Alerts }} {{"{{"}} range .Alerts{{"}}"}}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` *Alert:* {{"{{"}} .Annotations.summary{{"}}"}} - `{{"{{"}} .Labels.severity{{"}}"}}`
*Description:* {{ .Annotations.description }} *Description:* {{"{{"}} .Annotations.description{{"}}"}}
*Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:> *Graph:* <{{"{{"}} .GeneratorURL{{"}}"}}|:chart_with_upwards_trend:> *Runbook:* <{{"{{"}} .Annotations.runbook{{"}}"}}|:spiral_note_pad:>
*Details:* *Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}` {{"{{"}} range .Labels.SortedPairs{{"}}"}} • *{{"{{"}} .Name{{"}}"}}:* `{{"{{"}} .Value{{"}}"}}`
{{ end }} {{"{{"}} end{{"}}"}}
{{ end }} {{"{{"}} end{{"}}"}}