Collect metrics overview

This document describes what metrics are automatically available to youwhen you use Google Cloud services.It also describes different approaches thatyou can use to collect additional information about the performance ofyour services.

You can monitor the (numeric) metric data stored in your Google Cloud project bycreatingalerting policies. These policies notify you whenthe data monitored by the policy meets criteria that you define.You can also visualize yourmetric data by creatingcharts anddashboards.

The metrics scope of a Google Cloud project determines the time-series datathat can be charted or monitored by the Google Cloud project. By default, themetrics scope limits the project to the time-series data stored byproject. You can configure a metrics scope to include time-series datathat is stored by other projects.For conceptual information and references toconfiguration documents, seeMetrics scopes overview.

Metrics from Google Cloud services

System metrics generated by Google Cloud services are automaticallycollected and stored by Cloud Monitoring. These metrics provideinformation about how the service is operating. For example,Compute Engine reports over 25 unique metrics for eachvirtual machine (VM) instance.

For a complete list of available system metrics,seeGoogle Cloud metrics.

Metrics from your VMs

Some system metrics are automatically captured from your Compute Engineinstances. However, theseautomatically collected Compute Engine metricsmight not provide you with all the informationthat you need to monitor your services.

To collect additional system metrics from your Compute Engine instances,install an agent. For example,theOps Agent metrics include those for CPU, disk, memory,and swap. These metrics, and others, can be collected from yourLinux and Windows VMs.

For agent information, seeGoogle Cloud Observability agents.

Metrics from integrations

Cloud Monitoring provides integrations that let you collect telemetryfrom applications such as ApacheWeb Server, MySQL, Redis, and others for deployments running onCompute Engine and Google Kubernetes Engine:

In the Google Cloud console, go to the Integrations page:

Go toIntegrations

If you use the search bar to find this page, then select the result whose subheading isMonitoring.

Metrics you define

You can instrument your application so that it collectsapplication-specific information. Several open-sourceinstrumentation frameworks let you collect metrics, logs, andtraces from your application and send that data to any vendor,including Google Cloud. To instrument your application, we recommend that you use avendor-neutral instrumentation framework that is open source, such asOpenTelemetry, instead ofvendor- and product-specific APIs or client libraries.

For information about instrumenting your applications by usingvendor-neutral instrumentation frameworks, see Instrumentation and observability.

You can instrument your application by using a client libraryor theCloud Monitoring API.For more information about theseapproaches, seeUser-defined metrics overview.

Metrics derived from logs

Google Cloud supports creating metrics from log data. Theselog-based metrics record numeric information aboutthe logs written toCloud Logging.Some metrics, such as the total number of log entries received by yourGoogle Cloud project, are automatically derived from your logs.You can also define log-based metrics. For example, you mightcreate a metric that counts the number of404 Not Found errorsfor an application deployed to App Engine.

For more information, seeLog-based metrics overview.

Pricing

To learn about pricing for Cloud Monitoring, see theGoogle Cloud Observability pricing page.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.