Unknown model· unknown
from ShareGPT 90K (shared ChatGPT conversations)
Hey Assisant. How do I reference the "DashboardUId" in a Grafana alert message template?…
- User
Hey Assisant. How do I reference the "DashboardUId" in a Grafana alert message template? I'd like to generate a link to the dashboard and send it out with my Alert.
- Assistant
To reference the "DashboardUId" in a Grafana alert message template, you can use the
${__url_encoded_dashboardUid}variable. This variable will be replaced with the URL-encoded version of the DashboardUId when the alert is triggered.Here's an example of how you might use this variable in an alert message template:
codeThe alert '${alertName}' has been triggered on the dashboard '${dashboardTitle}'. You can view the dashboard by clicking on the following link: https://grafana.example.com/d/${__url_encoded_dashboardUid}This will generate a link to the dashboard that was associated with the alert. When clicked, the link will open the dashboard in Grafana.
I hope this helps! Let me know if you have any other questions.