Cannot make templates work with managed alerts

  • What Grafana version and what operating system are you using?
    Using grafana 8.3.2 as a docker container (Ubuntu)
    Older versions are affected as well

  • What are you trying to achieve?
    I’m trying to use custom templates to have more simple notifications when an alert fires. I’m just interested in the the dashboard/panelURL.

  • How are you trying to achieve it?
    Setting a custom template for grafana managed alerts

  • What happened?
    I get a mail with the status of the alert, but not the dashboard or panel URL (even though they work with the default template)

  • What did you expect to happen?
    A mail containing the pannel and dashboard URL

  • Can you copy/paste the configuration(s) that you are having problems with?
    {{ define “experimentaltemplate” }}
    Status : {{.Status}}
    Dashboard : {{.DashboardURL}}
    Panel : {{.PanelURL}}
    {{ end }}

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No error in Grafana UI or logs, the logs said that the notification is sent successfully.

  • Did you follow any online instructions? If so, what is the URL?
    The official documentation regarding alerts templates.

I just responded to another post with the same question I would have posted here. The site will not allow me to post the same thing. Take a look at my response here: