Skip to content

Dashboard Variables

Video Lecture

Dashboard Variables Dashboard Variables

Description

In the next few lessons, we will look at how to create and use dashboard variables.

We will create the variables using the Data sources set up in all the previous lessons.

Example Variables

Variable Type
Name
Data source Value/Query/Options
Interval interval 1m,10m,30m,1h,6h,12h,1d,7d,14d,30d
Custom custom abc, def, ghi, jkl
Data source dataSource Select a data source from the dropdown.
Query name MySQL SELECT username AS metric FROM exampledb.simple_table ORDER BY id
Query lokiName Loki Query type : Label names
Regex : /^(?!__aggregated_metric__)/
Query lokiHost Loki Query type : Label values
Label : host
Query lokiJob Loki Query type : Label values
Label : job
Query promName Prometheus Query type : Label names
Regex : /^(?!__name__)/
Query promJob Prometheus Query type : Label values
Label : job
Query instance Prometheus Query type : Label values
Label : instance
Label filters : job = $promJob
Query zabbixHost Zabbix Query type : Host
Group : /.*/
Host : /.*/
Query CPU Zabbix Query type : Item
Group : /.*/
Host : $zabbixHost
Item : /CPU/

Comments