Skip to content

Commit

Permalink
update silence link (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte committed Dec 17, 2024
1 parent 253a288 commit 51d0f0b
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
📈 Dashboard: ⚠️ There is no **dashboard** for this alert, time to sketch.
{{ end -}}
👀 Explore: {{ template "__queryurl" . }}
🔔 Silence: https://github.com/giantswarm/silences#silences
🔔 Silence: {{ template "__alert_silence_link" . }}

---

Expand All @@ -45,17 +45,9 @@
🔥 {{ if .Labels.instance }}{{ .Labels.instance }}: {{ end }}{{ .Annotations.description }}{{ end }}
{{- end }}

# This builds the silence URL. We exclude the alertname in the range
# to avoid the issue of having trailing comma separator (%2C) at the end
# of the generated URL
# Link to the silence repository where silences should be created
{{ define "__alert_silence_link" -}}
{{ .ExternalURL }}/#/silences/new?filter=%7B
{{- range .CommonLabels.SortedPairs -}}
{{- if ne .Name "alertname" -}}
{{- .Name }}%3D"{{- .Value -}}"%2C%20
{{- end -}}
{{- end -}}
alertname%3D"{{ .CommonLabels.alertname }}"%7D
https://github.com/giantswarm/silences#silences
{{- end }}

# Link to related PMs
Expand Down

0 comments on commit 51d0f0b

Please sign in to comment.