Skip to content

Google Cloud Monitoring metrics in Osuite

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.

  • An OpenTelemetry Collector from the Contrib distribution (otelcol-contrib) that includes the googlecloudmonitoring receiver.
  • 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 the monitoring.timeSeries.list permission the receiver needs.
  • Credentials available to the Collector through Application Default Credentials (ADC):
    • Off GCP: create a service account key and set GOOGLE_APPLICATION_CREDENTIALS to 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.

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.

Start the Collector and confirm it logs no authentication or permission errors against monitoring.googleapis.com. Then check 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.

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 prefixCovers
compute.googleapis.com/instanceCompute Engine VM CPU, disk, network
cloudsql.googleapis.com/databaseCloud SQL CPU, memory, disk, connections
pubsub.googleapis.comPub/Sub message and subscription backlog metrics
loadbalancing.googleapis.comLoad balancer request count, latency, backend health
storage.googleapis.comCloud Storage bucket object count and size
kubernetes.ioGKE cluster, node, and pod metrics

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:443 for 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/osuite exporter 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.

  • Dashboards — build views over your Google Cloud metrics.
  • Alerts — alert on GCP thresholds with PromQL.