Skip to content

Commit

Permalink
fix templates comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte committed Jan 6, 2025
1 parent 78b8e4a commit f5af73a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{`
{{/*
__alerturl is the link pointing to a page in Grafana with details and source expressiong of the alert.
/*}}
*/}}
{{ define "__alerturl" }}`}}{{ .Values.alerting.grafanaAddress }}{{`/alerting/Mimir/{{ .CommonLabels.alertname }}/find{{ end }}

{{/*
__dashboardurl is the link pointing the Grafana dashboard referenced in the alert annotation if any.
/*}}
*/}}
{{ define "__dashboardurl" -}}
{{- if match "^https://.+" (index .Alerts 0).Annotations.dashboard }}{{ (index .Alerts 0).Annotations.dashboard -}}
{{- else -}}
Expand All @@ -18,7 +18,7 @@
__queryurl is the link pointing to Grafana explore with the alert expression prefilled.

grafanaExploreURL is a Mimir Alertmanager specific template function: https://grafana.com/docs/mimir/latest/references/architecture/components/alertmanager/#templating, its second argument is the datasource id
/*}}
*/}}
{{ define "__queryurl" -}}
{{- grafanaExploreURL "`}}{{ .Values.alerting.grafanaAddress }}{{`" "ce76fwwsnhipsa" "now-1h" "now" (queryFromGeneratorURL (index .Alerts 0).GeneratorURL) -}}
{{- end }}
Expand Down

0 comments on commit f5af73a

Please sign in to comment.