Hi, I’m setting up some alerts from an Azure Monitor data source, using Grafana 8.
Just wondering how I can include things like the azure resource group, resource name, etc in the alert message?
Hi, I’m setting up some alerts from an Azure Monitor data source, using Grafana 8.
Just wondering how I can include things like the azure resource group, resource name, etc in the alert message?
hi @jamesslater
Check out this documentation and see if it helps. You should be able to place labels and template variables in handlebars:
Hi @mattabrams , Thanks for replying, yes i’ve seen that. It talk about using labels. $labels.namespace
but I am right in saying labels are pre-defined somewhere. They are not values pulled from the alerts data source?
Hi @jamesslater,
You can pass in template variables, and variables are defined in the dashboard settings. Check out this public dashboard:
https://play.grafana.org/d/000000056/templated-dynamic-dashboard?orgId=1
It has several variables including app. So if you look at the queries, they are using $app in the query. If you wanted to alert on a query that was using the $app variable, then yes, you can pass in the value dynamically into the alert message as "There is a problem with {{ $app }}.
Does that help?
Hi, Thank you for the Dashboard link, that is useful, but in Grafana 8, the alerts are separated from the Dashboards? and in this example I don’t have permissions to edit the alerts to see how they are constructed.
How can this be done with the new Grafana 8 alerts?
Check this out and see if it helps answer your questions. Some good video demos here:
This topic was automatically closed after 365 days. New replies are no longer allowed.