Templating Alert Message Using Variables

Hi,

I’m trying to refer the variables (like environment and domain) from dashboard.yaml configuration to the alert title and alert message. But its not working. Is it possible to do like this.

In dashboard.yaml
templating:
variables:
Environment: DEV
Domain: Foundational

In alert title,
${Environment}] [${Domain}] [Critical] Scheduler Heart Beat - Unhealthy Alert

I’m seeing additional option like “system” in the variable type drop-down option. When I click on that option its reloading the page.

NOTE:
Grafana Version: 7.3.1
We have number of EKS clusters and grafana running on as one of the node. This EKS is created using the terraform code and we are configuring the dashboard and datasource as kubeconfigmap.
I would like to pass these variable values from the terrform variables.

Any help will be appreciated.

Hi @devishree6

This should now be possible with the new Unified Alerting in Grafana 8, which shipped today. It’s an entirely new alerting platform with much greater power and ease-of-use.

Check it out:
docker run -p 3000:3000 --name=grafana -e "GF_FEATURE_TOGGLES_ENABLE=ngalert" grafana/grafana:8.0.0

This topic was automatically closed after 365 days. New replies are no longer allowed.