fixed some links, added recording rules to alerting

This commit is contained in:
Larissa Wandzura
2026-01-07 16:08:39 -06:00
parent 32d6d7fe40
commit 0382bec6c7
3 changed files with 84 additions and 11 deletions
@@ -68,6 +68,41 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/
configure-gcm:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/configure/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/configure/
query-editor:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/query-editor/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/query-editor/
template-variables:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/template-variables/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/template-variables/
annotations-gcm:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/annotations/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/annotations/
alerting-gcm:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/alerting/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/alerting/
google-authentication:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/google-authentication/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/google-authentication/
troubleshooting:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/troubleshooting/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/troubleshooting/
---
# Google Cloud Monitoring data source
@@ -80,13 +115,13 @@ Grafana includes native support for the Google Cloud Monitoring plugin, so you d
The following documents will help you get started with the Google Cloud Monitoring data source:
- [Configure the data source](configure/) - Set up authentication and connect to Google Cloud
- [Query editor](query-editor/) - Create and edit Metric and SLO queries
- [Template variables](template-variables/) - Create dynamic dashboards with Google Cloud Monitoring variables
- [Annotations](annotations/) - Overlay Google Cloud Monitoring events on graphs
- [Alerting](alerting/) - Create alert rules based on GCP metrics and SLOs
- [Google authentication](google-authentication/) - Configure authentication methods for GCP access
- [Troubleshooting](troubleshooting/) - Solve common configuration and query errors
- [Configure the data source](ref:configure-gcm) - Set up authentication and connect to Google Cloud
- [Query editor](ref:query-editor) - Create and edit Metric and SLO queries
- [Template variables](ref:template-variables) - Create dynamic dashboards with Google Cloud Monitoring variables
- [Annotations](ref:annotations-gcm) - Overlay Google Cloud Monitoring events on graphs
- [Alerting](ref:alerting-gcm) - Create alert rules based on GCP metrics and SLOs
- [Google authentication](ref:google-authentication) - Configure authentication methods for GCP access
- [Troubleshooting](ref:troubleshooting) - Solve common configuration and query errors
## Supported query types
@@ -121,7 +156,7 @@ To import a pre-configured dashboard:
1. Click the **Dashboards** tab.
1. Click **Import** next to the dashboard you want to use.
The dashboards include a [template variable](template-variables/) populated with the projects accessible by the configured [service account](google-authentication/) each time you load the dashboard. After Grafana loads the dashboard, you can select a project from the dropdown list.
The dashboards include a [template variable](ref:template-variables) populated with the projects accessible by the configured [service account](ref:google-authentication) each time you load the dashboard. After Grafana loads the dashboard, you can select a project from the dropdown list.
To customize an imported dashboard, save it under a different name. Otherwise, Grafana upgrades can overwrite your customizations with the new version.
@@ -11,6 +11,7 @@ keywords:
- alerts
- metrics
- slo
- recording rules
labels:
products:
- cloud
@@ -50,6 +51,11 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/troubleshooting/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/troubleshooting/
recording-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-recording-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-recording-rules/
---
# Google Cloud Monitoring alerting
@@ -206,6 +212,22 @@ Always verify your query returns expected data before creating an alert:
1. Confirm the data format and values are correct.
1. Verify the query returns numeric data suitable for threshold evaluation.
## Recording rules
The Google Cloud Monitoring data source supports [Grafana-managed recording rules](ref:recording-rules). Recording rules periodically pre-compute frequently used or computationally expensive queries, saving the results as a new time series metric.
Use recording rules to:
- Reduce query load on Google Cloud Monitoring by pre-computing complex aggregations.
- Create derived metrics from GCP data for use in alerts and dashboards.
- Import Google Cloud Monitoring data into a Prometheus-compatible database.
{{< admonition type="note" >}}
Grafana-managed recording rules write results to a Prometheus-compatible database (such as Grafana Mimir or the Grafana Cloud managed Prometheus). You must configure a target data source for storing the recorded metrics.
{{< /admonition >}}
For instructions on creating recording rules, refer to [Create recording rules](ref:recording-rules).
## Troubleshooting
If your Google Cloud Monitoring alerts aren't working as expected, use the following sections to diagnose and resolve common issues.
@@ -238,5 +260,6 @@ For additional troubleshooting help, refer to [Troubleshoot Google Cloud Monitor
- [Grafana Alerting documentation](ref:alerting)
- [Create alert rules](ref:create-alert-rule)
- [Create recording rules](ref:recording-rules)
- [Google Cloud Monitoring query editor](ref:query-editor)
@@ -33,6 +33,21 @@ refs:
destination: /docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc
google-authentication:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/google-authentication/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/google-authentication/
google-authentication-jwt:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/google-authentication/#create-a-gcp-service-account-and-key-file
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/google-authentication/#create-a-gcp-service-account-and-key-file
google-authentication-gce:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/google-authentication/#use-gce-default-service-account
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/google-cloud-monitoring/google-authentication/#use-gce-default-service-account
---
# Configure the Google Cloud Monitoring data source
@@ -54,19 +69,19 @@ Grafana includes a built-in Google Cloud Monitoring data source plugin, so you d
Before you can request data from Google Cloud Monitoring, you must configure authentication.
All requests to Google APIs are performed on the server-side by the Grafana backend.
For authentication options and configuration details, refer to [Google authentication](../google-authentication/).
For authentication options and configuration details, refer to [Google authentication](ref:google-authentication).
When you configure Google authentication, note the following requirements specific to Google Cloud Monitoring.
### Configure a GCP Service Account
When you [create a Google Cloud Platform (GCP) Service Account and key file](../google-authentication/#create-a-gcp-service-account-and-key-file), the Service Account must have the **Monitoring Viewer** role (**Role > Select a role > Monitoring > Monitoring Viewer**):
When you [create a Google Cloud Platform (GCP) Service Account and key file](ref:google-authentication-jwt), the Service Account must have the **Monitoring Viewer** role (**Role > Select a role > Monitoring > Monitoring Viewer**):
{{< figure src="/static/img/docs/v71/cloudmonitoring_service_account_choose_role.png" max-width="600px" class="docs-image--no-shadow" caption="Choose role" >}}
### Grant the GCE Default Service Account scope
If Grafana is running on a Google Compute Engine (GCE) virtual machine, when you [configure a GCE Default Service Account](../google-authentication/#configure-a-gce-default-service-account), you must also grant that Service Account access to the "Cloud Monitoring API" scope.
If Grafana is running on a Google Compute Engine (GCE) virtual machine, when you [configure a GCE Default Service Account](ref:google-authentication-gce), you must also grant that Service Account access to the "Cloud Monitoring API" scope.
## Enable Google Cloud Platform APIs