Skip to content

 Threejs and TypeScript
 SocketIO and TypeScript
 Blender Topological Earth
 Sweet Home 3D
 Design Patterns Python
 Design Patterns TypeScript
 Course Coupon Codes
Three.js and TypeScript
Kindle Edition
$9.99 $14.99 Paperback 
$29.99 $34.99

Design Patterns in TypeScript
Kindle Edition
$9.99 $14.99 Paperback
$19.99 $24.99

Design Patterns in Python
Kindle Edition
$9.99 $14.99 Paperback
$19.99 $24.99

Dashboard Variables

Video Lecture

Dashboard Variables Dashboard Variables Dashboard Variables


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

Name Type DataSource Value/Query
interval Interval 1m,10m,30m,1h,6h,12h,1d,7d,14d,30d
custom Custom abc, def, ghi, jkl
dataSource Datasource Elasticsearch
userName Query MySQL SELECT username AS metric FROM exampledb.simple_table ORDER BY id
name Query Loki label_names()
host Query Loki label_values(host)
job Query Loki label_values(job)
promNames Query Prometheus label_names()
promJob Query Prometheus label_values(job)
promHost Query Prometheus label_values(node_uname_info{job="$promJob"}, nodename)
source Query InfluxDB from(bucket: "telegraf")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "snmp")
|> group(columns: ["_field"])
|> distinct(column: "source")
interface Query InfluxDB from(bucket: "telegraf")
|> range(start: -1m)
|> filter(fn: (r) => r["_measurement"] == "interface")
|> filter(fn: (r) => r["source"] == "${source}")
|> group(columns: ["_field"])
|> distinct(column: "ifDescr")
zabbixHost Query Zabbix Query Type Host, Group /.*/, Host /.*/
unit Query Elasticsearch-Metricbeat {"find": "terms", "field": "systemd.unit"}