相关文章推荐
高兴的烈酒  ·  黑山对我持普通及公务普通护照公民实施签证便利 ...·  12 月前    · 
乖乖的灯泡  ·  Trader ...·  1 年前    · 
眼睛小的牛腩  ·  网络版自愿连锁经营业为什么容易成功?【选择是 ...·  1 年前    · 
有胆有识的灌汤包  ·  任艳红_百度百科·  1 年前    · 
朝气蓬勃的饭盒  ·  nook5刷机后不能下载文件安装apk【电纸 ...·  1 年前    · 
Code  ›  Add variables | Grafana documentation
enterprise dashboard grafana
https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/
紧张的树叶
8 月前
Create free account Contact us

Products

LGTM+ Stack

Logs

powered by Grafana Loki

Grafana

for visualization

Traces

powered by Grafana Tempo

Metrics

powered by Grafana Mimir and Prometheus

Profiles

powered by Grafana Pyroscope

Key Capabilities

AI/ML insights

Identify anomalies and reduce toil

Contextual root cause analysis

Automated anomaly correlation

SLO management

Create SLOs and error budget alerts

Alerting

Trigger alerts from any data source

Plugins

Connect Grafana to data sources, apps, and more

Observability Solutions

Frontend Observability

Gain real user monitoring insights

Application Observability

Monitor application performance

Infrastructure observability

Ensure infrastructure health and performance

Testing

Performance & load testing

powered by Grafana k6

Synthetic Monitoring

powered by Grafana k6

IRM

Grafana IRM

Observability native incident response

Incident

Routine task automation for incidents

OnCall

Flexible on-call management

Deploy The Stack

Grafana Cloud

Fully managed

Grafana Enterprise

Self-managed

Open Source

Grafana Loki

Multi-tenant log aggregation system

Grafana

Query, visualize, and alert on data

Grafana Tempo

High-scale distributed tracing backend

Grafana Mimir

Scalable and performant metrics backend

Grafana Pyroscope

Scalable continuous profiling backend

Grafana Beyla

eBPF auto-instrumentation

Grafana Faro

Frontend application observability web SDK

Grafana Alloy

OpenTelemetry Collector distribution with Prometheus pipelines

Grafana k6

Load testing for engineering teams

Prometheus

Monitor Kubernetes and cloud native

OpenTelemetry

Instrument and collect telemetry data

Graphite

Scalable monitoring for time series data

All

Community resources

Dashboard templates

Try out and share prebuilt visualizations

Prometheus exporters

Get your metrics into Prometheus quickly

end-to-end solutions

Opinionated solutions that help you get there easier and faster

Kubernetes Monitoring

Get K8s health, performance, and cost monitoring from cluster to container

Application Observability

Monitor application performance

Frontend Observability

Gain real user monitoring insights

Incident Response & Management

Detect and respond to incidents with a simplified workflow

All monitoring and visualization solutions

monitor infrastructure

Out-of-the-box KPIs, dashboards, and alerts for observability

linux server logo
Linux
windows logo
Windows
docker logo
Docker
postgresql logo
Postgres
mysql logo
MySQL
aws logo
AWS
kafka logo
Kafka
jenkins logo
Jenkins
rabbitmq logo
RabbitMQ
mongodb logo
MongoDB
microsoft azure observability logo
Microsoft Azure
google cloud observability with grafana cloud logo
Google Cloud
All monitoring solutions

visualize any data

Instantly connect all your data sources to Grafana

mongodb logo
MongoDB
appdynamics logo
AppDynamics
oracle database logo
Oracle
gitlab logo
GitLab
jira logo
Jira
salesforce logo
Salesforce
splunk logo
Splunk
datadog logo
Datadog
new relic logo
New Relic
snowflake logo
Snowflake
All visualization solutions

Learn

Stay up to date

GrafanaCON 2025

Our annual OSS community conference

ObservabilityCON 2025 (7-9 Oct)

Our flagship observability event

New

Blog

News, releases, cool stories, and more

Observability survey report 2025

Industry insights on the state of observability

New

Benefits of Observability

New research, reports, and insights

New

Story of Grafana

10 years of Grafana

Events

Upcoming in-person and virtual events

Success stories

By use case, product, and industry

Technical learning

Documentation

All the docs

Webinars and videos

Demos, webinars, and feature tours

Tutorials

Step-by-step guides

Workshops

Free, in-person or online

Learning Journeys

Expert guidance for mastering our platform

Writers' Toolkit

Contribute to technical documentation provided by Grafana Labs

Plugin development

Visit the Grafana developer portal for tools and resources for extending Grafana with plugins.

new

Professional Services

Expert guidance and training

Join the community

Community

Join the Grafana community

new

Community forums

Ask the community for help

Community Slack

Real-time engagement

Grafana Champions

Contribute to the community

new

Community organizers

Host local meetups

new

Docs

Grafana

Grafana Mimir

Grafana Tempo

Grafana Loki

Grafana Pyroscope

Grafana Alloy

Grafana Beyla

Grafana Faro

Grafana k6

OpenTelemetry

Prometheus

Writers’ Toolkit

Grafana Cloud

Grafana Cloud k6

Cloud Provider Observability

Synthetic Monitoring

Grafana Kubernetes Monitoring

Grafana IRM

Grafana SLO

Grafana Alerting

Grafana Machine Learning

Grafana Fleet Management

Application Observability

Grafana Enterprise

Grafana Enterprise Logs

Grafana Enterprise Metrics

Grafana Enterprise Traces

Plugin catalog

Visit documentation

Get started

Get started with Grafana

Build your first dashboard

Get started with Grafana Cloud

Learning Journeys

What's new / Release notes

Grafana: 12.0
Grafana k6: 0.57
Grafana Loki: 3.5
Grafana Mimir: 2.16
Grafana Pyroscope: 1.13
Grafana Tempo: 2.8
Pricing

Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

Sign in

LGTM+ Stack

Grafana Cloud Logs

Logs

powered by Grafana Loki

Grafana

Grafana

for visualization

Grafana Cloud Traces

Traces

powered by Grafana Tempo

Grafana Cloud Metrics

Metrics

powered by Grafana Mimir and Prometheus

Grafana Cloud Profiles

Profiles

powered by Grafana Pyroscope

Key Capabilities

AI/ML

AI/ML insights

Identify anomalies and reduce toil

Grafana Cloud Asserts

Contextual root cause analysis

Automated anomaly correlation

Grafana SLO

SLO management

Create SLOs and error budget alerts

Grafana Alerting

Alerting

Trigger alerts from any data source

Plugins

Plugins

Connect Grafana to data sources, apps, and more

Observability Solutions

Frontend Observability

Frontend Observability

Gain real user monitoring insights

Application Observability

Application Observability

Monitor application performance

Infrastructure Observability

Infrastructure observability

Ensure infrastructure health and performance

Testing

Grafana Cloud k6

Performance & load testing

powered by Grafana k6

Synthetic Monitoring

Synthetic Monitoring

powered by Grafana k6

IRM

Grafana Cloud IRM

Grafana IRM

Observability native incident response

Incident

Incident

Routine task automation for incidents

OnCall

OnCall

Flexible on-call management

Deploy The Stack

Grafana Cloud

Grafana Cloud

Fully managed

Grafana

Grafana Enterprise

Self-managed

The actually useful free plan
  • Grafana, of course
  • 14 day retention
  • 10k series Prometheus metrics
  • 500 VUh k6 testing
  • 50 GB logs, traces, and profiles
  • 50k frontend sessions
  • 2,232 app o11y host hours
  • 2,232 k8s monitoring host hours
  • 37,944 k8s monitoring container hours
  • and more cool stuff
Create free account No credit card needed, ever.
Grafana Cloud Logs

Grafana Loki

Multi-tenant log aggregation system

Grafana

Grafana

Query, visualize, and alert on data

Grafana Cloud Traces

Grafana Tempo

High-scale distributed tracing backend

Grafana Cloud Metrics

Grafana Mimir

Scalable and performant metrics backend

Grafana Cloud Profiles

Grafana Pyroscope

Scalable continuous profiling backend

Grafana Beyla

eBPF auto-instrumentation

Grafana Faro

Grafana Faro

Frontend application observability web SDK

Grafana Alloy

Grafana Alloy

OpenTelemetry Collector distribution with Prometheus pipelines

Grafana Cloud k6

Grafana k6

Load testing for engineering teams

Prometheus

Prometheus

Monitor Kubernetes and cloud native

OpenTelemetry

OpenTelemetry

Instrument and collect telemetry data

Graphite

Graphite

Scalable monitoring for time series data

All

Community resources

Dashboard templates
Try out and share prebuilt visualizations
Prometheus exporters
Get your metrics into Prometheus quickly

end-to-end solutions

Opinionated solutions that help you get there easier and faster

Kubernetes Monitoring

Kubernetes Monitoring

Get K8s health, performance, and cost monitoring from cluster to container

Application Observability

Application Observability

Monitor application performance

Frontend Observability

Frontend Observability

Gain real user monitoring insights

Incident Response & Management

Incident Response & Management

Detect and respond to incidents with a simplified workflow

monitor infrastructure

Out-of-the-box KPIs, dashboards, and alerts for observability

linux server logo Linux
windows logo Windows
docker logo Docker
postgresql logo Postgres
mysql logo MySQL
aws logo Kafka
jenkins logo Jenkins
rabbitmq logo RabbitMQ
mongodb logo MongoDB
microsoft azure observability logo Microsoft Azure
google cloud observability with grafana cloud logo Google Cloud

visualize any data

Instantly connect all your data sources to Grafana

mongodb logo MongoDB
appdynamics logo AppDynamics
oracle database logo Oracle
gitlab logo GitLab
jira logo Salesforce
splunk logo Splunk
datadog logo Datadog
new relic logo New Relic
snowflake logo Snowflake
All monitoring and visualization solutions

Stay up to date

GrafanaCON 2025

Our annual OSS community conference

ObservabilityCON 2025 (7-9 Oct)

Our flagship observability event

New

Blog

News, releases, cool stories, and more

Observability survey report 2025

Industry insights on the state of observability

New

Benefits of Observability

New research, reports, and insights

New

Story of Grafana

10 years of Grafana

Events

Upcoming in-person and virtual events

Success stories

By use case, product, and industry

Technical learning

Documentation

All the docs

Webinars and videos

Demos, webinars, and feature tours

Tutorials

Step-by-step guides

Workshops

Free, in-person or online

Learning Journeys

Expert guidance for mastering our platform

Writers' Toolkit

Contribute to technical documentation provided by Grafana Labs

Plugin development

Visit the Grafana developer portal for tools and resources for extending Grafana with plugins.

new

Professional Services

Expert guidance and training

Join the community

Community

Join the Grafana community

new

Community forums

Ask the community for help

Community Slack

Real-time engagement

Grafana Champions

Contribute to the community

new

Community organizers

Host local meetups

new

Featured

Getting started with grafana LGTM stack

Getting started with managing your metrics, logs, and traces using Grafana

Learn how to unify, correlate, and visualize data with dashboards using Grafana.

Learn more →

Open source

Grafana

Grafana

Grafana Cloud Metrics

Grafana Mimir

Grafana Cloud Traces

Grafana Tempo

Grafana Cloud Logs

Grafana Loki

Grafana Cloud Profiles

Grafana Pyroscope

Grafana Alloy

Grafana Alloy

Grafana Beyla

Grafana Faro

Grafana Faro

Grafana Cloud k6

Grafana k6

OpenTelemetry

OpenTelemetry

Prometheus

Prometheus

Writers Toolkit

Writers’ Toolkit

Cloud

Grafana Cloud

Grafana Cloud

Grafana Cloud k6

Grafana Cloud k6

Grafana Cloud Provider

Cloud Provider Observability

Synthetic Monitoring

Synthetic Monitoring

Kubernetes monitoring

Grafana Kubernetes Monitoring

OnCall

Grafana IRM

Grafana SLO

Grafana SLO

Grafana Alerting

Grafana Alerting

AI/ML

Grafana Machine Learning

Grafana Alloy

Grafana Fleet Management

Application Observability

Application Observability

Enterprise

Grafana

Grafana Enterprise

Grafana Cloud Logs

Grafana Enterprise Logs

Grafana Cloud Metrics

Grafana Enterprise Metrics

Grafana Cloud Traces

Grafana Enterprise Traces

Plugins Community

Plugin catalog

Visit documentation

Get started

Get started with Grafana

Build your first dashboard

Get started with Grafana Cloud

Learning Journeys

What's new / Release notes

Grafana: 12.0
Grafana k6: 0.57
Grafana Loki: 3.5
Grafana Mimir: 2.16
Grafana Pyroscope: 1.13
Grafana Tempo: 2.8
Technical documentation Plugin catalog
Choose a product
Viewing: v12.0 (latest) Find another version
  • Grafana documentation
    • What's new in Grafana v12.0
    • What's new in Grafana v11.6
    • What's new in Grafana v11.5
    • What's new in Grafana v11.4
    • What's new in Grafana v11.3
    • What's new in Grafana v11.2
    • What's new in Grafana v11.1
    • What's new in Grafana v11.0
    • What's new in Grafana v10.4
    • What's new in Grafana v10.3
    • What's new in Grafana v10.2
    • What's new in Grafana v10.1
    • What's new in Grafana v10.0
    • What's new in Grafana v9.5
    • What's new in Grafana v9.4
    • What's new in Grafana v9.3
    • What's new in Grafana v9.2
    • Breaking changes in Grafana v11.0
    • Breaking changes in Grafana v10.3
    • Breaking changes in Grafana v10.0
    • Upgrade strategies
    • Upgrade to v12.0
    • Upgrade to v11.6
    • Upgrade to v11.5
    • Upgrade to v11.4
    • Upgrade to v11.3
    • Upgrade to v11.2
    • Upgrade to v11.1
    • Upgrade to v11.0
    • Upgrade to v10.4
    • Upgrade to v10.3
    • Upgrade to v10.2
    • Upgrade to v10.1
    • Upgrade to v10.0
    • Upgrade to v9.5
    • Upgrade to v9.4
    • Upgrade to v9.3
    • Upgrade to v9.2
    • Upgrade to v9.1
    • Upgrade to v9.0
    • Upgrade to v8.5
    • Upgrade to v8.4
    • Upgrade to v8.3
    • Upgrade to v8.2
    • Upgrade to v8.1
    • Upgrade to v8.0
    • Grafana Enterprise
    • Grafana Cloud
    • What is Prometheus?
    • Dashboard overview
    • Introduction to time series
    • Time series dimensions
    • Histograms and heatmaps
    • Exemplars
    • Glossary
    • Build your first dashboard
    • Get started with Grafana and Prometheus
    • Get started with Grafana and InfluxDB
    • Get started with Grafana and MS SQL Server
      • Debian or Ubuntu
      • RHEL or Fedora
      • SUSE or openSUSE
      • Grafana Docker image
      • Grafana on Kubernetes
      • Grafana on Helm Charts
      • macOS
      • Windows
      • Configure Grafana Enterprise
      • Configure feature toggles
      • Configure profiling and tracing
      • Configure custom branding
      • Settings updates at runtime
      • Configure data source proxy
    • Start Grafana
    • Sign in to Grafana
      • Plan your IAM integration strategy
        • Basic auth
        • Passwordless
        • Anonymous access
        • LDAP
        • LDAP user interface
        • Enhanced LDAP
          • SAML user interface
          • SAML configuration options
          • Configure SAML signing and encryption
          • Configure Role and Team sync for SAML
          • Configure Organisation mapping for SAML
          • Configure SAML single logout
          • Configure SAML with Entra ID
          • Configure SAML with Okta
          • Troubleshooting
        • Generic OAuth
        • Azure AD/Entra ID OAuth
        • GitHub OAuth
        • GitLab OAuth
        • Google OAuth
        • Grafana Cloud OAuth2
        • Keycloak OAuth2
        • Multiple providers with Keycloak
        • Okta OIDC
        • Auth proxy
        • JWT
        • Manage users and teams with SCIM
        • Configure SCIM with Azure AD
        • Configure SCIM with Okta
        • Encrypt database secrets using Google Cloud KMS
        • Encrypt database secrets using Hashicorp Vault
        • Encrypt database secrets using AWS KMS
        • Encrypt database secrets using Azure Key Vault
        • Integrate Grafana with Hashicorp Vault
      • Audit a Grafana instance
      • Export logs of usage insights
      • Configure secret scanning
      • Configure Team Sync
      • Configure request security
      • Configure security hardening
    • Set up Grafana monitoring
    • Set up HA
    • Set up HTTPS
      • Monitor the image renderer
      • Troubleshooting
    • Set up Grafana Live
    • Configure a Docker image
    • Back up Grafana
        • Configure LBAC for data sources for Loki
        • Configure LBAC for data sources for Prometheus
        • Create LBAC for data sources rules for a supported data source
      • Configure Grafana Teams
      • Administer Grafana Teams
    • Manage organizations
        • Assign or remove Grafana server administrator privileges
        • Add or remove a user in an organization
        • Change a user's organization permissions
      • Manage user preferences
      • Manage users in an organization
      • Manage dashboard permissions
    • Grafana Advisor
    • Recorded queries
        • Plan your RBAC rollout strategy
        • Configure RBAC
        • Assign RBAC roles
        • Manage RBAC roles
        • Provisioning RBAC with Grafana
        • Provisioning RBAC with Terraform
        • RBAC role definitions
        • RBAC permissions, actions, and scopes
        • RBAC for app plugins
        • Troubleshooting RBAC
    • View server statistics and license
        • Activate a Grafana Enterprise license from AWS Marketplace on EKS
        • Activate a Grafana Enterprise license from AWS Marketplace on ECS
        • Activate a Grafana Enterprise license from AWS on an instance deployed outside of AWS
        • Manage your Grafana Enterprise license in AWS Marketplace
        • Transfer your AWS Marketplace Grafana Enterprise license
    • Organization preferences
      • Customize navigation placement of plugin pages
    • Provision Grafana
      • Migrate API keys
      • Correlation
      • Permissions
      • Add permissions
      • Create a new correlation
      • Use variables and transformations in a correlation
      • Use correlations in visualizations
    • Announcement banner
      • Manually migrate to Grafana Cloud
      • Migrate to Grafana Cloud using the Grafana Cloud Migration Assistant
    • Alertmanager
      • AWS authentication
      • Query editor
      • Template variables
      • Query editor
      • Template variables
      • Configure Elasticsearch
      • Query editor
      • Template variables
      • Authentication
      • Query editor
      • Template variables
      • Query editor
      • Template variables
      • Configure the InfluxDB data source
      • Query editor
      • Template variables
      • Configure Loki
      • Query editor
      • Template variables
    • Jaeger
      • Query editor
      • Template variables
      • Configure the MySQL data source
      • MySQL query editor
    • OpenTSDB
    • Parca
      • Configure the PostgreSQL data source
      • PostgreSQL query editor
      • Configure Prometheus
      • Query editor
      • Template variables
      • Configure Pyroscope
      • How profiling and tracing work together
      • Configure traces to profiles
      • Query profile data
      • Configure Tempo
      • Best practices
        • Link to a trace ID
        • Upload JSON trace file
        • Trace correlations
        • TraceQL query structure
        • Search traces
        • Write TraceQL queries
      • Service Graph and Service Graph view
      • Span filters
    • TestData
    • Zipkin
    • Use dashboards
      • Create a dashboard
      • Import dashboards
      • Modify dashboard settings
      • Manage dashboard links
      • Dashboard URL variables
      • Manage library panels
      • Manage version history
      • Annotate visualizations
      • JSON model
      • Best practices
    • Manage dashboards
    • Search dashboards
    • Manage playlists
      • Settings
      • Shared dashboards
      • Add variables
      • Inspect variables
      • Variable syntax
    • Assess dashboard usage
    • Troubleshoot dashboards
      • Time series
      • Alert list
      • Annotations list
      • Bar chart
      • Bar gauge
      • Candlestick
      • Canvas
      • Dashboard list
      • Datagrid
      • Flame graph
      • Gauge
      • Geomap
      • Heatmap
      • Histogram
      • Logs
      • News
      • Node graph
      • Pie chart
      • Stat
      • State timeline
      • Status history
      • Table
      • Text
      • Traces
      • Trend
      • XY chart
    • Panel overview
    • Panel editor
    • The panel inspect view
      • Write expression queries
      • SQL expressions
      • Share query results
      • Transform data
      • Troubleshoot queries
      • Calculation types
    • Configure panel options
    • Configure standard options
    • Configure a legend
    • Configure tooltips
    • Configure data links and actions
    • Configure value mappings
    • Configure thresholds
    • Configure field overrides
  • Search
    • Get started with Explore
    • Query management in Explore
    • Query inspector in Explore
    • Correlations Editor in Explore
    • Logs in Explore
    • Traces in Explore
        • Access or Install
        • Get started
        • Labels and Fields
        • Log patterns
        • Viewing JSON logs
        • Sorting and ordering
        • Troubleshooting
          • Profile settings
          • What is profiling?
          • Continuous profiling
          • Understand profiling types
          • Flame graphs
        • Get started
        • Determine your use case
        • Choose a view
          • Use Flame graph AI
        • Access or install
          • Trace structure
          • Traces and telemetry
            • Identify bottlenecks and establish SLOs
            • Diagnose errors with traces
          • Glossary
        • Get started
          • Choose span data
          • Choose a RED metric
          • Analyze tracing data
          • Add filters
          • View exemplars
        • UI reference
        • Metrics and telemetry
        • Get started
        • Drill down your metrics
        • Investigations
        • Start investigations
        • Compare time ranges
    • Get started with Observability as Code
      • Install Grafana CLI
      • Set up Grafana CLI
      • Manage resources with Grafana CLI
      • annotations schema
      • PanelKind schema
      • LibraryPanelKind schema
      • layout schema
      • links schema
      • timesettings schema
      • variables schema
      • Automate dashboard provisioning with CI/CD
      • Git Sync
      • Set up Git Sync
      • Set up file provisioning
      • Work with provisioned dashboards
      • Manage repositories
        • Queries and conditions
        • Labels and annotations
        • State and health of alerts
        • Stale alert instances
        • Contact points
        • Notification policies
        • Grouping
      • Templates
      • Configure Grafana-managed alert rules
      • Configure data source-managed alert rules
      • Create and link alert rules to panels
        • Create Grafana-managed recording rules
        • Create data source-managed recording rules
        • Template reference
        • Examples
        • Template language
        • API alert rules import
        • Amazon SNS
        • Discord
        • Email
        • Google Chat
        • Grafana IRM
        • Jira
        • Microsoft Teams
        • MQTT
        • Opsgenie
        • PagerDuty
        • Slack
        • Telegram
        • Webhook
      • Configure notification policies
      • Configure mute timings
      • Configure silences
        • Manage templates
        • Template reference
        • Examples
        • Template language
        • Use images
      • View alert rules
      • View alert state
      • View alert state history
      • View active notifications
      • Declare incidents from firing alerts
      • Configure roles and permissions
        • Manage access using roles
        • Manage access using folders or data sources
      • Configure Alertmanagers
      • Configure alert state history
        • Use configuration files to provision
        • Use Terraform to provision
        • Export alerting resources
        • Use the HTTP API to manage alerting resources
      • Configure high availability
      • Meta monitoring
      • Performance considerations and limitations
      • Handle connectivity errors
      • Handle missing data
      • Examples of multi-dimensional alerts
      • Examples of table data
      • Examples of dynamic thresholds
      • Examples of dynamic labels
      • Tutorials
    • Send panel to support
    • Send a support bundle to support
      • Authentication
        • API Tutorial: Create Service Account tokens and dashboards for an organization
        • cURL examples
      • Admin HTTP API
      • Alerting Provisioning HTTP API
      • Annotations HTTP API
      • Correlations HTTP API
      • Dashboard HTTP API
      • Dashboard Permissions HTTP API
      • Dashboard Versions HTTP API
      • Data source HTTP API
      • Datasource LBAC rules HTTP API
      • Datasource Permissions HTTP API
      • Folder HTTP API
      • Folder Permissions HTTP API
      • Folder/Dashboard Search HTTP API
      • Library Element HTTP API
      • Licensing HTTP API
      • New API Structure
      • Organization HTTP API
      • Other HTTP API
      • Playlist HTTP API
      • Preferences API
      • Query and Resource Caching HTTP API
      • Query History HTTP API
      • RBAC HTTP API
      • Reporting API
      • Service account HTTP API
      • Shared Dashboards HTTP API
      • Short URL HTTP API
      • Snapshot API
      • SSO Settings API
      • Team HTTP API
      • Team Sync HTTP API
      • User HTTP API
    • Contribute to Grafana
    • Contributor License Agreement (CLA)
    • Grafana Cloud Enterprise Open source

      Add variables

      The following table lists the types of variables shipped with Grafana.

      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 (Prometheus, Loki, InfluxDB, 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 .

      Enter General options

      You must enter general options for any type of variable that you create. To create a variable, follow these steps:

    1. Click Edit in the top-right corner of the dashboard.

    2. Click Settings .

    3. Go to the Variables tab.

    4. Click Add variable , or if there are already existing variables, + New variable .

    5. Choose an option in the Select variable type drop-down list.

    6. Enter a Name for the variable.

    7. (Optional) In the Label field, enter the display name for the variable drop-down list.

      If you don’t enter a display name, then the drop-down list label is the variable name.

    8. Choose a Show on dashboard option:

      • Label and value - The variable drop-down list displays the variable Name or Label value. This is the default.
      • Value: The variable drop-down list only displays the selected variable value and a down arrow.
      • Nothing: No variable drop-down list is displayed on the dashboard.
    9. Click one of the following links to complete the steps for adding your selected variable type:

      • Query
      • Custom
      • Textbox
      • Constant
      • Data source
      • Interval
      • Ad hoc filters

    Add a query variable

    Query variables enable you to write a data source query that can return a list of metric names, tag values, or keys. For example, a query variable might return a list of server names, sensor IDs, or data centers. The variable values change as they dynamically fetch options with a data source query.

    Query variables are generally only supported for strings. If your query returns numbers or any other data type, you might need to convert them to strings to use them as variables. For the Azure data source, for example, you can use the tostring function for this purpose.

    Query expressions can contain references to other variables and in effect create linked variables. Grafana detects this and automatically refreshes a variable when one of its linked variables change.

    Note

    Query expressions are different for each data source. For more information, refer to the documentation for your data source .

    1. Enter general options .

    2. Under the Query options section of the page, select a target data source in the Data source drop-down list.

      You can also click Open advanced data source picker to see more options, including adding a data source (Admins only). For more information about data sources, refer to Add a data source .

    3. In the Query type drop-down list, select one of the following options:

      • Label names
      • Label values
      • Metrics
      • Query result
      • Series query
      • Classic query
    4. In the Query field, enter a query.

      • The query field varies according to your data source. Some data sources have custom query editors.
      • Each data source defines how the variable values are extracted. The typical implementation uses every string value returned from the data source response as a variable value. Make sure to double-check the documentation for the data source.
      • Some data sources let you provide custom “display names” for the values. For instance, the PostgreSQL, MySQL, and Microsoft SQL Server plugins handle this by looking for fields named __text and __value in the result. Other data sources may look for text and value or use a different approach. Always remember to double-check the documentation for the data source.
      • If you need more room in a single input field query editor, then hover your cursor over the lines in the lower right corner of the field and drag downward to expand.
    5. (Optional) In the Regex field, type a regular expression to filter or capture specific parts of the names returned by your data source query. To see examples, refer to Filter variables with a regular expression .

    6. In the Sort drop-down list, select the sort order for values to be displayed in the dropdown list. The default option, Disabled , means that the order of options returned by your data source query is used.

    7. Under Refresh , select when the variable should update options:

      • On dashboard load - Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized.
      • On time range change - Queries the data source every time the dashboard loads and when the dashboard time range changes. Use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
    8. (Optional) Configure the settings in the Selection Options section:

      • Multi-value - Enables multiple values to be selected at the same time.
      • Include All option - Enables an option to include all variables.
    9. In the Preview of values section, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.

    10. Click Save dashboard .

    11. Click Back to dashboard and Exit edit .

    Add a custom variable

    Use a custom variable for a value that does not change, such as a number or a string.

    For example, if you have server names or region names that never change, then you might want to create them as custom variables rather than query variables. Because they do not change, you might use them in chained variables rather than other query variables. That would reduce the number of queries Grafana must send when chained variables are updated.

    1. Enter general options .

    2. Under the Custom options section of the page, in the Values separated by comma field, enter the values for this variable in a comma-separated list.

      You can include numbers, strings, or key/value pairs separated by a space and a colon. For example, key1 : value1,key2 : value2 .

    3. (Optional) Configure the settings in the Selection Options section:

      • Multi-value - Enables multiple values to be selected at the same time.
      • Include All option - Enables an option to include all variables.
    4. In the Preview of values section, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.

    5. Click Save dashboard .

    6. Click Back to dashboard and Exit edit .

    Add a text box variable

    Text box variables display a free text input field with an optional default value. This is the most flexible variable, because you can enter any value. Use this type of variable if you have metrics with high cardinality or if you want to update multiple panels in a dashboard at the same time.

    For more information about cardinality, refer to What are cardinality spikes and why do they matter?

    1. Enter general options .

    2. (Optional) Under the Text options section of the page, in the Default value field, enter the default value for the variable.

      If you do not enter anything in this field, then Grafana displays an empty text box for users to type text into.

    3. Click Save dashboard .

    4. Click Back to dashboard and Exit edit .

    Add a constant variable

    Constant variables enable you to define a hidden constant. This is useful for metric path prefixes for dashboards you want to share. When you export a dashboard, constant variables are converted to import options.

    Constant variables are not flexible. Each constant variable only holds one value, and it cannot be updated unless you update the variable settings.

    Constant variables are useful when you have complex values that you need to include in queries but don’t want to retype in every query. For example, if you had a server path called i-0b6a61efe2ab843gg , then you could replace it with a variable called $path_gg .

    1. Enter general options .

    2. Under the Constant options section of the page, in the Value field, enter the variable value.

      You can enter letters, numbers, and symbols. You can even use wildcards if you use raw format .

    3. Click Save dashboard .

    4. Click Back to dashboard and Exit edit .

    Add a data source variable

    Data source variables enable you to quickly change the data source for an entire dashboard. They are useful if you have multiple instances of a data source, perhaps in different environments.

    1. Enter general options .

    2. Under the Data source options section of the page, in the Type drop-down list, select the target data source for the variable.

    3. (Optional) In Instance name filter , enter a regular expression filter for which data source instances to choose from in the variable value drop-down list.

      Leave this field empty to display all instances.

    4. (Optional) Configure the settings in the Selection Options section:

      • Multi-value - Enables multiple values to be selected at the same time.
      • Include All option - Enables an option to include all variables.
    5. In the Preview of values section, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.

    6. Click Save dashboard .

    7. Click Back to dashboard and Exit edit .

    Add an interval variable

    Use an interval variable to represents time spans such as 1m , 1h , 1d . You can think of them as a dashboard-wide “group by time” command. Interval variables change how the data is grouped in the visualization. You can also use the Auto Option to return a set number of data points per time span.

    You can use an interval variable as a parameter to group by time (for InfluxDB), date histogram interval (for Elasticsearch), or as a summarize function parameter (for Graphite).

    1. Enter general options .

    2. Under the Interval options section, in the Values field, enter the time range intervals that you want to appear in the variable drop-down list.

      The following time units are supported: s (seconds) , m (minutes) , h (hours) , d (days) , w (weeks) , M (months) , and y (years) . You can also accept or edit the default values: 1m,10m,30m,1h,6h,12h,1d,7d,14d,30d .

    3. (Optional) Select on the Auto option checkbox if you want to add the auto option to the list.

      This option allows you to specify how many times the current time range should be divided to calculate the current auto time span. If you turn it on, then two more options appear:

      • Step count - Select the number of times the current time range is divided to calculate the value, similar to the Max data points query option. For example, if the current visible time range is 30 minutes, then the auto interval groups the data into 30 one-minute increments. The default value is 30 steps.
      • Min interval - The minimum threshold below which the step count intervals does not divide the time. To continue the 30 minute example, if the minimum interval is set to 2m, then Grafana would group the data into 15 two-minute increments.
    4. In the Preview of values section, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.

    5. Click Save dashboard .

    6. Click Back to dashboard and Exit edit .

    Interval variable examples

    The following example shows a template variable myinterval in a Graphite function:

    summarize($myinterval, sum, false)

    The following example shows a more complex Graphite example, from the Graphite Template Nested Requests panel :

    groupByNode(summarize(movingAverage(apps.$app.$server.counters.requests.count, 5), '$interval', 'sum', false), 2, 'sum')

    Add ad hoc filters

    Ad hoc filters are one of the most complex and flexible variable options available. Instead of a regular list of variable options, this variable allows you to build a dashboard-wide ad hoc query.

    Ad hoc filters let you add label/value filters that are automatically added to all metric queries that use the specified data source. Unlike other variables, you don’t use ad hoc filters in queries. Instead, you use ad hoc filters to write filters for existing queries.

    Note

    Not all data sources support ad hoc filters. Examples of those that do include Prometheus, Loki, InfluxDB, and Elasticsearch.

    To create an ad hoc filter, follow these steps:

    1. Enter general options .

    2. Under the Ad-hoc options section of the page, select a target data source in the Data source drop-down list.

      You can also click Open advanced data source picker to see more options, including adding a data source (Admins only). For more information about data sources, refer to Add a data source .

    3. (Optional) To provide the filter dimensions as comma-separated values (CSV), toggle the Use static key dimensions switch on, and then enter the values in the space provided.

    4. Click Save dashboard .

    5. Enter an optional description of your dashboard changes, and then click Save .

    6. Click Back to dashboard and Exit edit .

    Now you can filter data on the dashboard .

    Configure variable selection options

    Selection Options are a feature you can use to manage variable option selections. All selection options are optional, and they are off by default.

    Multi-value variables

    Interpolating a variable with multiple values selected is tricky as it is not straight forward how to format the multiple values into a string that is valid in the given context where the variable is used. Grafana tries to solve this by allowing each data source plugin to inform the templating interpolation engine what format to use for multiple values.

    Note

    The Custom all value option on the variable must be blank for Grafana to format all values into a single string. If it is left blank, then Grafana concatenates (adds together) all the values in the query. Something like value1,value2,value3 . If a custom all value is used, then instead the value is something like * or all .

    Multi-value variables with a Graphite data source

    Graphite uses glob expressions. A variable with multiple values would, in this case, be interpolated as {host1,host2,host3} if the current variable value was host1 , host2 , and host3 .

    Multi-value variables with a Prometheus or InfluxDB data source

    InfluxDB and Prometheus use regular expressions, so the same variable would be interpolated as (host1|host2|host3) . Every value would also be regular expression escaped. If not, a value with a regular expression control character would break the regular expression.

    Multi-value variables with an Elastic data source

    Elasticsearch uses Lucene query syntax, so the same variable would be formatted as ("host1" OR "host2" OR "host3") . In this case, every value must be escaped so that the value only contains Lucene control words and quotation marks.

    Troubleshoot multi-value variables

    Automatic escaping and formatting can cause problems and it can be tricky to grasp the logic behind it. Especially for InfluxDB and Prometheus where the use of regular expression syntax requires that the variable is used in regular expression operator context.

    If you do not want Grafana to do this automatic regular expression escaping and formatting, then you must do one of the following:

    • Turn off the Multi-value or Include All option options.
    • Use the raw variable format .

    Include All option

    Grafana adds an All option to the variable dropdown list. If a user selects this option, then all variable options are selected.

    Custom all value

    This option is only visible if the Include All option is selected.

    Enter regular expressions, globs, or Lucene syntax in the Custom all value field to define the value of the All option.

    By default the All value includes all options in combined expression. This can become very long and can have performance problems. Sometimes it can be better to specify a custom all value, like a wildcard regular expression.

    In order to have custom regular expression, globs, or Lucene syntax in the Custom all value option, it is never escaped so you have to think about what is a valid value for your data source.

    Global variables

    Grafana has global built-in variables that can be used in expressions in the query editor. This topic lists them in alphabetical order and defines them. These variables are useful in queries, dashboard links, panel links, and data links.

    $__dashboard

    This variable is the name of the current dashboard.

    $__from and $__to

    Grafana 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.

    Syntax Example result Description
    ${__from} 1594671549254 Unix millisecond epoch
    ${__from:date} 2020-07-13T20:19:09.254Z No arguments, defaults to ISO 8601/RFC 3339
    ${__from:date:iso} 2020-07-13T20:19:09.254Z ISO 8601/RFC 3339
    ${__from:date:seconds} 1594671549 Unix seconds epoch
    ${__from:date:YYYY-MM} 2020-07 Any custom date format that does not include the : character. Uses browser time. Use :date or :date:iso for UTC

    The syntax above also works with ${__to} .

    You can use this variable in URLs, as well. For example, you can send a user to a dashboard that shows a time range from six hours ago until now: https://play.grafana.org/d/000000012/grafana-play-home?viewPanel=2&orgId=1?from=now-6h&to=now

    $__interval

    You can use the $__interval variable as a parameter to group by time (for InfluxDB, MySQL, Postgres, MSSQL), Date histogram interval (for Elasticsearch), or as a summarize function parameter (for Graphite).

    Grafana automatically calculates an interval that can be used to group by time in queries. When there are more data points than can be shown on a graph, then queries can be made more efficient by grouping by a larger interval. It is more efficient to group by 1 day than by 10s when looking at 3 months of data. The graph looks the same and the query is faster. The $__interval is calculated using the time range and the width of the graph (the number of pixels).

    Approximate Calculation: (to - from) / resolution

    For example, when the time range is 1 hour and the graph is full screen, then the interval might be calculated to 2m - points are grouped in 2 minute intervals. If the time range is 6 months and the graph is full screen, then the interval might be 1d (1 day) - points are grouped by day.

    In the InfluxDB data source, the legacy variable $interval is the same variable. $__interval should be used instead.

    The InfluxDB and Elasticsearch data sources have Group by time interval fields that are used to hard code the interval or to set the minimum limit for the $__interval variable (by using the > syntax -> >10m ).

    $__interval_ms

    This variable is the $__interval variable in milliseconds, not a time interval formatted string. For example, if the $__interval is 20m then the $__interval_ms is 1200000 .

    $__name

    This variable is only available in the Singlestat panel and can be used in the prefix or suffix fields on the Options tab. The variable is replaced with the series name or alias.

    Note

    The Singlestat panel is no longer available from Grafana 8.0.

    $__org

    This variable is the ID of the current organization. ${__org.name} is the name of the current organization.

    $__user

    ${__user.id} is the ID of the current user. ${__user.login} is the login handle of the current user. ${__user.email} is the email for the current user.

    $__range

    Currently only supported for Prometheus and Loki data sources. This variable represents the range for the current dashboard. It is calculated by to - from . It has a millisecond and a second representation called $__range_ms and $__range_s .

    $__rate_interval

    Currently only supported for Prometheus data sources. The $__rate_interval variable is meant to be used in the rate function. Refer to Prometheus query variables for details.

    $__rate_interval_ms

    This variable is the $__rate_interval variable in milliseconds, not a time-interval-formatted string. For example, if the $__rate_interval is 20m then the $__rate_interval_ms is 1200000 .

    $timeFilter or $__timeFilter

    The $timeFilter variable returns the currently selected time range as an expression. For example, the time range interval Last 7 days expression is time > now() - 7d .

    This is used in several places, including:

    • The WHERE clause for the InfluxDB data source. Grafana adds it automatically to InfluxDB queries when in Query Editor mode. You can add it manually in Text Editor mode: WHERE $timeFilter .
    • Log Analytics queries in the Azure Monitor data source.
    • SQL queries in MySQL, Postgres, and MSSQL.
    • The $__timeFilter variable is used in the MySQL data source.

    $__timezone

    The $__timezone variable returns the currently selected time zone, either utc or an entry of the IANA time zone database (for example, America/New_York ).

    If the currently selected time zone is Browser Time , Grafana tries to determine your browser time zone.

    Chained variables

    Chained variables , also called linked variables or nested variables , are query variables with one or more other variables in their variable query. This section explains how chained variables work and provides links to example dashboards that use chained variables.

    Chained variable queries are different for every data source, but the premise is the same for all. You can use chained variable queries in any data source that allows them.

    Extremely complex linked templated dashboards are possible, 5 or 10 levels deep. Technically, there is no limit to how deep or complex you can go, but the more links you have, the greater the query load.

    Grafana Play dashboard examples

    The following Grafana Play dashboards contain fairly simple chained variables, only two layers deep. To view the variables and their settings, click Edit and then Settings ; then go to the Variables tab. Both examples are expanded in the following section.

    • Graphite Templated Nested
    • InfluxDB Templated

    Examples explained

    Variables are useful to reuse dashboards and dynamically change what is shown in dashboards. Chained variables are especially useful to filter what you see.

    Create parent/child relationship in a variable, sort of a tree structure where you can select different levels of filters.

    The following sections explain the linked examples in the dashboards above in depth and builds on them. While the examples are data source-specific, the concepts can be applied broadly.

    Graphite example

    In this example, there are several applications. Each application has a different subset of servers. It is based on the Graphite Templated Nested .

    Now, you could make separate variables for each metric source, but then you have to know which server goes with which app. A better solution is to use one variable to filter another. In this example, when the user changes the value of the app variable, it changes the dropdown options returned by the server variable. Both variables use the Multi-value option and Include all option , enabling users to select some or all options presented at any time.

    app variable

    The query for this variable basically says, “Find all the applications that exist.”

    apps.*

    The values returned are backend , country , fakesite , and All .

    server variable

    The query for this variable basically says, “Find all servers for the currently chosen application.”

    apps.$app.*

    If the user selects backend , then the query changes to:

    apps.backend.*

    The query returns all servers associated with backend , including backend_01 , backend_02 , and so on.

    If the user selects fakesite , then the query changes to:

    apps.fakesite.*

    The query returns all servers associated with fakesite , including web_server_01 , web_server_02 , and so on.

    More variables

    Note

    This example is theoretical. The Graphite server used in the example does not contain CPU metrics.

    The dashboard stops at two levels, but you could keep going. For example, if you wanted to get CPU metrics for selected servers, you could copy the server variable and extend the query so that it reads:

    apps.$app.$server.cpu.*

    This query basically says, “Find the CPU metrics for the selected server.”

    Depending on what variable options the user selects, you could get queries like:

    apps.backend.backend_01.cpu.*
    apps.{backend.backend_02,backend_03}.cpu.*
    apps.fakesite.web_server_01.cpu.*

    InfluxDB example

    In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the InfluxDB Templated dashboard.

    In this example, when the user changes the value of the datacenter variable, it changes the dropdown options returned by the host variable. The host variable uses the Multi-value option and Include all option , allowing users to select some or all options presented at any time. The datacenter does not use either option, so you can only select one data center at a time.

    datacenter variable

    The query for this variable basically says, “Find all the data centers that exist.”

    SHOW TAG VALUES WITH KEY = "datacenter"

    The values returned are America , Africa , Asia , and Europe .

    host variable

    The query for this variable basically says, “Find all hosts for the currently chosen data center.”

    SHOW TAG VALUES WITH KEY = "hostname" WHERE "datacenter" =~ /^$datacenter$/

    If the user selects America , then the query changes to:

    SHOW TAG VALUES WITH KEY = "hostname" WHERE "datacenter" =~ /^America/

    The query returns all servers associated with America , including server1 , server2 , and so on.

    If the user selects Europe , then the query changes to:

    SHOW TAG VALUES WITH KEY = "hostname" WHERE "datacenter" =~ /^Europe/

    The query returns all servers associated with Europe , including server3 , server4 , and so on.

    More variables

    Note

    This example is theoretical. The InfluxDB server used in the example does not contain CPU metrics.

    The dashboard stops at two levels, but you could keep going. For example, if you wanted to get CPU metrics for selected hosts, you could copy the host variable and extend the query so that it reads:

    SHOW TAG VALUES WITH KEY = "cpu" WHERE "datacenter" =~ /^$datacenter$/ AND "host" =~ /^$host$/

    This query basically says, “Find the CPU metrics for the selected host.”

    Depending on what variable options the user selects, you could get queries like:

    bash Copy
    SHOW TAG VALUES WITH KEY = "cpu" WHERE "datacenter" =~ /^America/ AND "host" =~ /^server2/
    SHOW TAG VALUES WITH KEY = "cpu" WHERE "datacenter" =~ /^Africa/ AND "host" =~ /^server/7/
    SHOW TAG VALUES WITH KEY = "cpu" WHERE "datacenter" =~ /^Europe/ AND "host" =~ /^server3+server4/

    Best practices and tips

    The following practices make your dashboards and variables easier to use.

    New linked variables creation

    • Chaining variables create parent/child dependencies. You can envision them as a ladder or a tree.
    • The easiest way to create a new chained variable is to copy the variable that you want to base the new one on. In the variable list, click the Duplicate variable icon to the right of the variable entry to create a copy. You can then add on to the query for the parent variable.
    • New variables created this way appear at the bottom of the list. You might need to drag it to a different position in the list to get it into a logical order.

    Variable order

    You can change the orders of variables in the dashboard variable list by clicking the up and down arrows on the right side of each entry. Grafana lists variable dropdowns left to right according to this list, with the variable at the top on the far left.

    • List variables that do not have dependencies at the top, before their child variables.
    • Each variable should follow the one it is dependent on.
    • Remember there is no indication in the UI of which variables have dependency relationships. List the variables in a logical order to make it easy on other users (and yourself).

    Complexity consideration

    The more layers of dependency you have in variables, the longer it takes to update dashboards after you change variables.

    For example, if you have a series of four linked variables (country, region, server, metric) and you change a root variable value (country), then Grafana must run queries for all the dependent variables before it updates the visualizations in the dashboard.

    Filter variables with regular expressions

    Using the Regex query option, you filter the list of options returned by the variable query or modify the options returned.

    This page shows how to use a regular expression to filter/modify values in the variable dropdown.

    Using the Regex query option, you filter the list of options returned by the Variable query or modify the options returned. For more information, refer to the Mozilla guide on Regular expressions .

    Examples of filtering on the following list of options:

    text Copy
    backend_01
    backend_02
    backend_03
    backend_04

    Filter so that only the options that end with 01 or 02 are returned:

    Regex :

    regex Copy
    /(01|02)$/

    Result:

    text Copy
    backend_01
    backend_02

    Filter and modify the options using a regular expression to capture group to return part of the text:

    Regex :

    regex Copy
    /.*(01|02)/

    Result:

    text Copy
    01
    02

    Filter and modify - Prometheus Example

    List of options:

    text Copy
    up{instance="demo.robustperception.io:9090",job="prometheus"} 1 1521630638000
    up{instance="demo.robustperception.io:9093",job="alertmanager"} 1 1521630638000
    up{instance="demo.robustperception.io:9100",job="node"} 1 1521630638000

    Regex :

    regex Copy
    /.*instance="([^"]*).*/

    Result:

    text Copy
    demo.robustperception.io:9090
    demo.robustperception.io:9093
    demo.robustperception.io:9100

    Filter and modify using named text and value capture groups

    Using named capture groups, you can capture separate ’text’ and ‘value’ parts from the options returned by the variable query. This allows the variable drop-down list to contain a friendly name for each value that can be selected.

    For example, when querying the node_hwmon_chip_names Prometheus metric, the chip_name is a lot friendlier than the chip value. So the following variable query result:

    text Copy
    node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_0",chip_name="enp216s0f0np0"} 1
    node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_1",chip_name="enp216s0f0np1"} 1
    node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_2",chip_name="enp216s0f0np2"} 1
    node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_3",chip_name="enp216s0f0np3"} 1

    Passed through the following regular expression:

    regex Copy
    /chip_name="(?<text>[^"]+)|chip="(?<value>[^"]+)/g

    Would produce the following drop-down list:

    text Copy
    Display Name          Value
    ------------          -------------------------
    enp216s0f0np0         0000:d7:00_0_0000:d8:00_0
    enp216s0f0np1         0000:d7:00_0_0000:d8:00_1
    enp216s0f0np2         0000:d7:00_0_0000:d8:00_2
    enp216s0f0np3         0000:d7:00_0_0000:d8:00_3

    Note

    Only text and value capture group names are supported.

    Was this page helpful?

    Suggest an edit in GitHub
    Create a GitHub issue
    Email docs@grafana.com
    Help and support
    Community

    Related resources from Grafana Labs

    Additional helpful documentation, links, and articles:
    video icon
    60 min
    Getting started with managing your metrics, logs, and traces using Grafana
    Getting started with managing your metrics, logs, and traces using Grafana
    In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.
    webinar icon
    16 Jul
    Getting started with Grafana dashboard design
    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.
    webinar icon
    30 Jul
    Building advanced Grafana dashboards
    Building advanced Grafana dashboards
    In this webinar, we’ll demo how to build and format Grafana dashboards.

    Is this page helpful?

    On this page
    • Enter General options
    • Add a query variable
    • Add a custom variable
    • Add a text box variable
    • Add a constant variable
    • Add a data source variable
    • Add an interval variable
    • Interval variable examples
    • Add ad hoc filters
    • Configure variable selection options
    • Multi-value variables
    • Include All option
    • Custom all value
    • Global variables
    • $__dashboard
    • $__from and $__to
    • $__interval
    • $__interval_ms
    • $__name
    • $__org
    • $__user
    • $__range
    • $__rate_interval
    • $__rate_interval_ms
    • $timeFilter or $__timeFilter
    • $__timezone
    • Chained variables
    • Grafana Play dashboard examples
    • Examples explained
    • Best practices and tips
    • Filter variables with regular expressions
    • Filter so that only the options that end with 01 or 02 are returned:
    • Filter and modify the options using a regular expression to capture group to return part of the text:
    • Filter and modify - Prometheus Example
    • Filter and modify using named text and value capture groups
    Scroll for more
    Sign up for Grafana stack updates
    Note: By signing up, you agree to be emailed related product-level information.

 
推荐文章
高兴的烈酒  ·  黑山对我持普通及公务普通护照公民实施签证便利化措施_云南省人民政府外事办公室
12 月前
乖乖的灯泡  ·  Trader Joe’s母公司:德国廉价连锁超市品牌 – 奥乐齐超市(阿尔迪)ALDI | 美股之家 | 美股百科 | 港美股开户投资
1 年前
眼睛小的牛腩  ·  网络版自愿连锁经营业为什么容易成功?【选择是大于努力的吧】_百度贴吧
1 年前
有胆有识的灌汤包  ·  任艳红_百度百科
1 年前
朝气蓬勃的饭盒  ·  nook5刷机后不能下载文件安装apk【电纸书吧】_百度贴吧
1 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号