Open Desolar1um opened 2 months ago
hi @Desolar1um
Could you please provide the custom template you are using (with any sensitive information redacted)?
Thank you
Hello @tonypowa, Thanks for your time. I've included my current template below
{{- define "email.message_alert" -}}
{{ .Labels.alertname }}
{{ range .Annotations.SortedPairs }}
{{ .Name }}:
{{ .Value }}
{{ end }}
{{- end -}}
{{ define "email.message" }}
{{ if .Alerts.Firing -}}
{{ len .Alerts.Firing }} Firing
{{- range .Alerts.Firing }}
- {{ template "email.message_alert" . }}
Annotations:
{{ range .Annotations.SortedPairs }}- {{ .Name }} = {{ .Value }}
{{ end }}{{ if gt (len .SilenceURL) 0 }}- Silence: {{ .SilenceURL }}
{{ end }}{{ if gt (len .DashboardURL) 0 }}- Dashboard: {{ .DashboardURL }}
{{ end }}{{ if gt (len .PanelURL) 0 }}- Panel: {{ .PanelURL }}
{{ end }}{{ if gt (len .Annotations.alertUid) 0 }}- Alert: https://<redacted>/alerting/grafana/{{ .Annotations.alertUid }}/view?returnTo=%2Falerting%2Flist
{{ end }}
{{- end }}
{{- end }}
{{ if .Alerts.Resolved -}}
{{ len .Alerts.Resolved }} Resolved
{{- range .Alerts.Resolved }} {{ template "email.message_alert" . }}
Annotations:
{{ range .Annotations.SortedPairs }}- {{ .Name }} = {{ .Value }}
{{ end }}{{ if gt (len .SilenceURL) 0 }}- Silence: {{ .SilenceURL }}
{{ end }}{{ if gt (len .DashboardURL) 0 }}- Dashboard: {{ .DashboardURL }}
{{ end }}{{ if gt (len .PanelURL) 0 }}- Panel: {{ .PanelURL }}
{{ end }}{{ if gt (len .Annotations.alertUid) 0 }}- Alert: https://<redacted>/alerting/grafana/{{ .Annotations.alertUid }}/view?returnTo=%2Falerting%2Flist
{{ end }}
{{- end }}
{{- end }}
{{ end }}
Any finding here? @tonypowa
Any finding here? @tonypowa
Hi @Desolar1um The issue is already added to the team's board Thank you your patience
What happened?
Using a custom alerting notification template for E-mail does not include image renderer screenshots
Example default template output:
Example custom template output:
What did you expect to happen?
Alert emails include panel screenshots
Did this work before?
No
How do we reproduce it?
Is the bug inside a dashboard panel?
No response
Environment (with versions)?
Grafana: v10.3.3 On K8s
Grafana platform?
Kubernetes
Datasource(s)?
No response