The topic of variables in Grafana has generated a myriad of questions lately. In short, there are three types of variables.
We created this video to structure the subject and speed up the learning curve for Grafana enthusiasts.
Dashboard variables capture the values within one dashboard. They are usually used for filter functionality.
Global variables are Grafana settings you can retrieve and use on your dashboards.
|Name of the current dashboard.|
|From of Time Range in epoch milliseconds.|
|Parameter to group by time.|
|Name of the current organization.|
|Id of the current organization.|
|To of Time Range in epoch milliseconds.|
|Email for the current user.|
|Id of the current user.|
|Login handle of the current user.|
You can find all the global built-in variables in the Grafana documentation.
Environment variables are the variables from the Grafana environment (operating system and/or device) where Grafana is installed.
Conventionally those variables are off-limits, but with the Environment data source, access to the environment variables is possible!
The following blog post provides more information about variable types with examples.