Collect metrics overview

Cloud Monitoring lets you collect performance metrics across your infrastructure and applications. In addition to the system metrics that Monitoring automatically collects from Google Cloud services, you can collect metrics from VM agents, third-party integrations, custom application instrumentation, and logs.

To monitor system health and performance trends, you can visualize metric data on charts and dashboards, or create alerting policies that notify you when metrics cross thresholds that you define.

Monitor data in multiple projects

You can chart and monitor any metric data that is stored by your project. This data includes metrics that resources in your project generate and metrics that applications generate and send to your project.

To chart or monitor data that is stored in multiple projects, add those projects to your Google Cloud project's metrics scope. For more information, see Metrics scopes overview.

Metrics from Google Cloud services

System metrics generated by Google Cloud services are automatically collected and stored by Cloud Monitoring. These metrics provide information about how the service is operating. For example, Compute Engine reports over 25 unique metrics for each virtual machine (VM) instance.

For a complete list of available system metrics, see Google Cloud metrics.

Metrics from an agent in your VM

Some system metrics are automatically captured from your Compute Engine instances. However, these automatically collected Compute Engine metrics might not provide you with all the information that you need to monitor your services.

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

For agent information, see Google Cloud Observability agents.

Metrics from third-party monitoring applications

Cloud Monitoring provides integrations that let you collect telemetry from applications such as Apache Web Server, MySQL, and Redis for deployments running on Compute Engine and Google Kubernetes Engine:

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

Go to Integrations

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

Metrics you define

Instrument your application to collect specific information that helps you understand its performance and troubleshoot failures. Several open-source instrumentation frameworks collect log, metric, and trace data, and can send that data to any vendor, including Google Cloud. For your agentic applications, some frameworks can collect your prompts and responses or pass context that allows tracing of some remote Google Cloud MCP servers calls.

To instrument your application, we recommend that you use an open-source, vendor-neutral instrumentation framework, such as OpenTelemetry, instead of vendor- and product-specific APIs or client libraries. For information about these frameworks, see Instrumentation and observability and Choose an instrumentation approach.

You can instrument your application by using a client library or the Cloud Monitoring API. For more information about these approaches, see User-defined metrics overview.

Metrics derived from logs

Google Cloud supports creating metrics from log data. These log-based metrics record numeric information about the logs written to Cloud Logging. Some metrics, such as the total number of log entries received by your Google Cloud project, are automatically derived from your logs. You can also define log-based metrics. For example, you might create a metric that counts the number of 404 Not Found errors for an application deployed to App Engine.

For more information, see Log-based metrics overview.

Pricing

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