Templates and variables | Grafana Labs
grafana.com › docs › grafanaGrafana Viewers can use variables. Variables and templates also allow you to single-source dashboards. If you have multiple identical data sources or servers, you can make one dashboard and use variables to change what you are viewing. This simplifies maintenance and upkeep enormously. Templates A template is any query that contains a variable.
Variable syntax | Grafana Labs
grafana.com › docs › grafana${var_name} Use this syntax when you want to interpolate a variable in the middle of an expression. ${var_name:<format>} This format gives you more control over how Grafana interpolates values. Refer to Advanced variable format options for more detail on all the formatting types. [[varname]] Do not use. Deprecated old syntax, will be removed in ...
Global variables | Grafana Labs
grafana.com › docs › grafanaGrafana has two built in time range variables: $__from and $__to. They are currently always interpolated as epoch milliseconds by default but you can control date formatting. This special formatting syntax is only available in Grafana 7.1.2+ The above syntax works with $ {__to} as well. You can use this variable in URLs as well.