In my Contact Point, I have the following for the alert subject:
{{ define "alert_subject" }}
{{ if eq .Status "firing" }}
{{ .Labels.node_name }} Load Alert
{{ end }}
{{ if eq .Status "resolved" }}
{{ .Labels.node_name }} OK
{{ end }}
{{ end }}
It shows the correct text, but the link takes me to the https://<grafana_url>/graph/alerting/list screen in Grafana. Is there any way to change the URL of the link to be the .PanelURL instead? I have been unable to find this information.
Can you confirm: are you using the new Grafana Alerting platform (first released in Grafana 8) or the legacy alerting platform? I should note that the legacy platform is no longer actively developed:
I figured it out. In order for the links to show up, I needed to add the Dashboard UID and Panel ID in the Alert Rule. Now I can show them using the .DashboardURL and .PanelURL template variables.
@devopssauce Could you provide an example of how you’ve done this? I’d also like to have hyperlinks in strings to point to the panel url, but I’m still not sure how.