Menu
Grafana Cloud

Google Cloud Monitoring template variables

Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables. Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard. Grafana refers to such variables as template variables.

For an introduction to templating and template variables, refer to the Templating and Add and manage variables documentation.

Use query variables

Variables of the type Query help you query Google Cloud Monitoring for various types of data. The Google Cloud Monitoring data source plugin provides the following Query Types:

NameList returned
Metric TypesMetric type names available for the specified service.
Labels KeysKeys for metric label and resource label in the specified metric.
Labels ValuesValues for the label in the specified metric.
Resource TypesResource types for the specified metric.
AggregationsAggregations (cross-series reducers) for the specified metric.
AlignersAligners (per-series aligners) for the specified metric.
Alignment periodsAll alignment periods available in the query editor in Grafana.
SelectorsSelectors for SLO (Service Level Objectives) queries.
SLO ServicesService Monitoring services for SLO queries.
Service Level Objectives (SLO)SLOs for the specified SLO service.

Use variables in queries

Use Grafana’s variable syntax to include variables in queries. For details, refer to the variable syntax documentation.