Template variables are not supported in alert queries – Grafana error

When you try to create the first alert on a Grafana dashboard, you may get the error message:

Template variables are not supported in alert queries

Cause

All queries of the panel use at least one template variable with the format ${VARIABLE_NAME} or $VARIABLE_NAME

Template variables usually represent the value of selected items in dropdown lists, like the data source, region, queue name.

Alerts run queries outside of the dashboard, do not have information on the value of selected items. Alert queries have to be able to collect data without user interaction.

In the AWS SQS Queue dashboard template # 584 there are three template variables we need to replace with selected items:

Solution

Click each variable and select the appropriate values from the lists.

To create a new query without template variables

  • Click the + Query button at the bottom of the Query tab

Leave a comment

Your email address will not be published. Required fields are marked *