The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/docs/sources/reference/templating.md

1.9 KiB

page_title page_description page_keywords
Templated dashboards Templated dashboards grafana, templating, variables, guide, documentation

Templated Dashboards

Overview

Templating allows you to create dashboard variables that can be used in your metric queries, series names and panel titles. Use this feature to create generic dashboards that can quickly be changed to show graphs for different servers or metrics.

You find this feature in the dashboard cog dropdown menu.

Variable types

There are three different types of template variables. They can all be used in the same way but they differ in how the list variables values is created.

Query

This is the most common type of variable. It allows you to create a variable with values fetched directly from a data source via a metric exploration query.

For example a query like prod.servers.* will fill the variable with all possible values that exists in the wildcard position (Graphite example).

You can also create nested variables that use other variables in their definition. For example apps.$app.servers.* uses the variable $app in its query definition.

For examples of template queries appropriate for your data source checkout the documentation page for your data source.

Interval

This variable type is useful for time ranges like 1m,1h, 1d. There is also an auto option that will change depending on the current time range, you can specify how many times the current time range should be divided to calculate the current auto range.

Custom

This variable type allow you to manually specify all the different values as a comma seperated string.

Screencast - Templated Graphite Queries