Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/v7.5/variables/variable-types.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/v7.5/variables/variable-types/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Menu
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.
Enterprise
Open source
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 resources from Grafana Labs
Additional helpful documentation, links, and articles:
Choose a product
Viewing: v7.5
Find another version
Scroll for more