Google Cloud Monitoring metrics in Osuite
Overview
Section titled “Overview”Osuite ingests Google Cloud metrics through the OpenTelemetry Collector. The googlecloudmonitoring receiver reads time series from the Cloud Monitoring API on an interval, converts them to OTLP, and forwards them through the otlp/osuite exporter, where they correlate with the rest of your telemetry.
The receiver runs anywhere the Collector runs and pulls metrics for one GCP project. Run one Collector per project, or several receivers with different project_id values.
Prerequisites
Section titled “Prerequisites”- An OpenTelemetry Collector from the Contrib distribution (
otelcol-contrib) that includes thegooglecloudmonitoringreceiver. - Your Osuite ingest endpoint and token.
- A GCP service account the Collector authenticates as. Grant it the Monitoring Viewer role (
roles/monitoring.viewer), which includes themonitoring.timeSeries.listpermission the receiver needs. - Credentials available to the Collector through Application Default Credentials (ADC):
- Off GCP: create a service account key and set
GOOGLE_APPLICATION_CREDENTIALSto the JSON key file path. - On GCP (GCE, GKE, Cloud Run): attach the service account to the workload — no key file needed. On GKE, Workload Identity is the recommended binding.
- Off GCP: create a service account key and set
Collector config
Section titled “Collector config”This configuration reads two Cloud Monitoring metric types for one project and forwards them to Osuite. Set project_id to your GCP project.
receivers: googlecloudmonitoring: collection_interval: 5m project_id: my-gcp-project-id metrics_list: - metric_name: "compute.googleapis.com/instance/cpu/utilization" - metric_name: "cloudsql.googleapis.com/database/cpu/utilization"
processors: batch:
exporters: otlp/osuite: endpoint: ingest.<region>.osuite.io:443 tls: insecure: false headers: x-osuite-ingest-token: <your-ingest-token>
service: pipelines: metrics: receivers: [googlecloudmonitoring] processors: [batch] exporters: [otlp/osuite]Each entry under metrics_list takes either an exact metric_name or a metric_descriptor_filter to match a set of metric types — one or the other per entry, not both.
Validate
Section titled “Validate”Start the Collector and confirm it logs no authentication or permission errors against monitoring.googleapis.com. Then check Osuite.
Verify in Osuite
Section titled “Verify in Osuite”What you should see
Cloud Monitoring metrics appear in Dashboards → Explore metrics within a few minutes, named after their Google Cloud metric type such as compute.googleapis.com/instance/cpu/utilization.
Data collected
Section titled “Data collected”Metrics keep their Google Cloud metric type as the name and carry the resource labels from Cloud Monitoring (project, zone, instance, and service-specific labels). Only the metric types you list under metrics_list are collected.
Common metric domains:
| Metric prefix | Covers |
|---|---|
compute.googleapis.com/instance | Compute Engine VM CPU, disk, network |
cloudsql.googleapis.com/database | Cloud SQL CPU, memory, disk, connections |
pubsub.googleapis.com | Pub/Sub message and subscription backlog metrics |
loadbalancing.googleapis.com | Load balancer request count, latency, backend health |
storage.googleapis.com | Cloud Storage bucket object count and size |
kubernetes.io | GKE cluster, node, and pod metrics |
Troubleshooting
Section titled “Troubleshooting”No data usually means a permission gap or a metric type that does not exist for the project. Confirm the service account has roles/monitoring.viewer, that GOOGLE_APPLICATION_CREDENTIALS points at a readable key (or the attached identity is correct), and that each metric_name is a valid Cloud Monitoring metric type. Verify a metric type with gcloud monitoring metrics-descriptors list before adding it.
No data in Osuite after a few minutes? Work through these checks.
- Endpoint — confirm the exporter targets exactly
ingest.<region>.osuite.io:443for your region, over TLS. - Token — confirm the ingest header carries a valid
<your-ingest-token>and has not been rotated. - Pipeline — confirm the signal you expect (traces, logs, or metrics) is wired into an active pipeline with the
otlp/osuiteexporter attached. - Export errors — check the application or Collector logs for OTLP export failures (auth, DNS, TLS, connection refused).
- Network — confirm the host has outbound access to the ingest endpoint on port
443. - Timing — allow up to a minute for the first data to appear before assuming a failure.
Still stuck? Ask the Investigation Agent or contact support.
Next steps
Section titled “Next steps”- Dashboards — build views over your Google Cloud metrics.
- Alerts — alert on GCP thresholds with PromQL.