Add variables
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Variables types
Grafana uses several types of variables.
Variable type | Description |
---|---|
Query | Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on. Add a query variable. |
Custom | Define the variable options manually using a comma-separated list. Add a custom variable. |
Text box | Display a free text input field with an optional default value. Add a text box variable. |
Constant | Define a hidden constant. Add a constant variable. |
Data source | Quickly change the data source for an entire dashboard. Add a data source variable. |
Interval | Interval variables represent time spans. Add an interval variable. |
Ad hoc filters | Key/value filters that are automatically added to all metric queries for a data source (InfluxDB, Prometheus, and Elasticsearch only). Add ad hoc filters. |
Global variables | Built-in variables that can be used in expressions in the query editor. Refer to Global variables. |
Chained variables | Variable queries can contain other variables. Refer to Chained variables. |
Was this page helpful?
Related documentation
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
24 Apr

Getting started with Grafana dashboard design
In this webinar, you'll learn how to design stylish and easily accessible Grafana dashboards that tell a story.
08 May

Grafana 12 deep dive
It wouldn’t be GrafanaCON without a new release. Join us as we dive into the latest features of Grafana 12, including dashboards as code, Git-based configs, dynamic dashboards, and more.
08 May

Monitoring EA App’s 200+ core error metrics with a scalable, color-coded Grafana dashboard
Learn how engineers at Electronic Arts built a Grafana dashboard that client teams can use to monitor 200+ core error metrics.