mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 01:34:19 +08:00

* Docs: Revise data source index * Docs: Consolidate data source administration docs * Docs: Revise panels docs related to data sources * Docs: Revise Alertmanager data source * Docs: Reorganize AWS CloudWatch data source docs * Docs: Reorganize Azure Monitor data source docs * Docs: Move azuremonitor to azure-monitor * Docs: Revise Elasticsearch docs * Docs: Move Elasticsearch index into bundle * Docs: Revise GCM docs * Docs: Revise Graphite docs * Docs: Move Graphite index into bundle * Docs: Revise InfluxDB docs * Docs: Revise Jaeger docs * Docs: Move Jaeger index into bundle * Docs: Revise Loki docs * Docs: Move Loki index into bundle * Docs: Revise MS SQL docs * Docs: Move MS SQL index into bundle * Docs: Revise Prometheus docs * Docs: Move Prometheus index into bundle * Docs: Revise Tempo docs * Docs: Move Tempo index into bundle * Docs: Revise TestData DB docs * Docs: Move TestData DB index into bundle * Docs: Revise Zipkin docs * Docs: Move Zipkin index into bundle * Docs: Move other data sources' index pages into bundles * Docs: Revise frontmatter * Fixing hugo markdown errors * Docs: Add query editor and template var sections to overview doc * Docs: Remove CTAs across data source docs * Docs: Remove CTA * Docs: Remove CTA * Docs: Fix links, images, typos, and usage consistency. * Docs: Fix typos * Docs: Fix CI issues * Update docs/sources/datasources/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Update docs/sources/datasources/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Docs: Fix query editor links * Update docs/sources/panels-visualizations/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Update docs/sources/panels-visualizations/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Docs: Rebundle child pages per writers' toolkit * Docs: Fix prettier for CI * Docs: Fix relrefs from outside data sources docs * Docs: Fix broken relrefs within datasources * Docs: Fix relrefs to data sources docs * Fixed some more refs Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
48 lines
2.7 KiB
Markdown
48 lines
2.7 KiB
Markdown
---
|
|
aliases:
|
|
- /docs/grafana/latest/data-sources/google-cloud-monitoring/template-variables/
|
|
description: Guide for using template variables when querying the Google Cloud Monitoring data source
|
|
keywords:
|
|
- grafana
|
|
- google
|
|
- cloud
|
|
- monitoring
|
|
- queries
|
|
- template
|
|
- variable
|
|
menuTitle: Template variables
|
|
title: Google Cloud Monitoring template variables
|
|
weight: 300
|
|
---
|
|
|
|
# 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]({{< relref "../../../dashboards/variables" >}}) and [Add and manage variables]({{< relref "../../../dashboards/variables/add-template-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**:
|
|
|
|
| Name | List returned |
|
|
| ---------------------------------- | --------------------------------------------------------------------- |
|
|
| **Metric Types** | Metric type names available for the specified service. |
|
|
| **Labels Keys** | Keys for `metric label` and `resource label` in the specified metric. |
|
|
| **Labels Values** | Values for the label in the specified metric. |
|
|
| **Resource Types** | Resource types for the specified metric. |
|
|
| **Aggregations** | Aggregations (cross-series reducers) for the specified metric. |
|
|
| **Aligners** | Aligners (per-series aligners) for the specified metric. |
|
|
| **Alignment periods** | All alignment periods available in the query editor in Grafana. |
|
|
| **Selectors** | Selectors for SLO (Service Level Objectives) queries. |
|
|
| **SLO Services** | Service 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]({{< relref "../../../dashboards/variables/variable-syntax" >}}).
|