Variables
Supporting dashboard variables greatly simplifies work with configuring the alerting in general.
Let's say, you have two very similar devices and your task is to monitor their technical health by creating alerts in the event of an alert rule breach.
Your alert rules are almost identical for both devices with only thresholds being slightly different. For instance, the CPU usage of one device must stay within the 0 to 2 percent range and the other CPU usage can go over 2%.
Without dashboard variables, you have to create two separate alert rules. For a small number of devices, this approach is reasonable. However, it turns into a severe headache once instead of two devices you need to maintain hundreds. For every device, you will have to create and maintain a separate alert rule containing an identical query.
Overrides
With dashboard variables enabled, creating one alert rule is enough. The thresholds could be configured in the Overrides.
Here is an example of the Time Series visualization where one data series triggers an alert and another does not.
To access the alert rule configuration in the Business Studio, select the Business Engines from the main screen, then switch to the Alert rules tab.
Configuration
From there, either use the existing alert rule from the list to reconfigure or create a new rule by clicking on the + Add button.
Below is what the configuration of the alert rule using dashboard variables might look like.
Custom variable values
Grafana supports a wide range of data sources. From the beginning, we ensured the compatibility between the Business Engine and SQL and Prometheus data sources. We are actively working on ensuring many other data sources are compatible.
However, in the case when variables for your particular data source are not yet supported, we allow to specify variable values directly.