このドキュメントでは、 Google Cloud サービスを使用する際に自動的に使用できる指標について説明します。また、サービスのパフォーマンスに関する追加情報を収集するために使用できるさまざまなアプローチについても説明します。
アラート ポリシーを作成することで、 Google Cloud プロジェクトに保存されている(数値)指標データをモニタリングできます。これらのポリシーによってモニタリングされるデータが定義した基準を満たしたときに通知されます。グラフやダッシュボードを作成して、指標データを可視化することもできます。
Google Cloud プロジェクトの指標スコープにより、 Google Cloud プロジェクトでグラフ化またはモニタリングできる時系列データが決まります。デフォルトでは、指標スコープはプロジェクトによって保存された時系列データにプロジェクトを制限します。他のプロジェクトによって保存された時系列データを含めるように指標スコープを構成できます。コンセプト情報と構成ドキュメントについては、指標スコープの概要をご覧ください。
Google Cloud サービスからの指標
Google Cloud サービスによって生成されたシステム指標は、Cloud Monitoring によって自動的に収集および保存されます。これらの指標から、サービスの運用に関する情報を得られます。たとえば、Compute Engine は、仮想マシン(VM)インスタンスごとに 25 個以上の一意の指標を報告します。
アプリケーション固有の情報を収集するように、アプリケーションを計測できます。いくつかのオープンソースの計測化フレームワークを使用すると、アプリケーションから指標、ログ、トレースを収集してデータを Google Cloudなどのベンダーに送信できます。アプリケーションを計測化する場合は、ベンダー固有またはプロダクト固有の API やクライアント ライブラリではなく、OpenTelemetry などのオープンソースの計測化フレームワークを使用することをおすすめします。
Google Cloud は、ログデータからの指標の作成をサポートしています。これらのログベースの指標は、Cloud Logging に書き込まれたログに関する数値情報を記録します。Google Cloud プロジェクトで受信したログエントリの合計数など、一部の指標はログから自動的に取得されます。ログベースの指標を定義することもできます。たとえば、App Engine にデプロイされたアプリケーションの 404 Not Found エラーの数をカウントする指標を作成できます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-05 UTC。"],[],[],null,["# Collect metrics overview\n\nThis document describes what metrics are automatically available to you\nwhen you use Google Cloud services.\nIt also describes different approaches that\nyou can use to collect additional information about the performance of\nyour services.\n\nYou can monitor the (numeric) metric data stored in your Google Cloud project by\ncreating [alerting policies](/monitoring/alerts). These policies notify you when\nthe data monitored by the policy meets criteria that you define.\nYou can also visualize your\nmetric data by creating [charts](/monitoring/charts/metrics-explorer) and\n[dashboards](/monitoring/dashboards).\n\nThe metrics scope of a Google Cloud project determines the time-series data\nthat can be charted or monitored by the Google Cloud project. By default, the\nmetrics scope limits the project to the time-series data stored by\nproject. You can configure a metrics scope to include time-series data\nthat is stored by other projects.\nFor conceptual information and references to\nconfiguration documents, see [Metrics scopes overview](/monitoring/settings).\n\nMetrics from Google Cloud services\n----------------------------------\n\nSystem metrics generated by Google Cloud services are automatically\ncollected and stored by Cloud Monitoring. These metrics provide\ninformation about how the service is operating. For example,\nCompute Engine reports over 25 unique metrics for each\nvirtual machine (VM) instance.\n\nFor a complete list of available system metrics,\nsee [Google Cloud metrics](/monitoring/api/metrics_gcp).\n\nMetrics from your VMs\n---------------------\n\nSome system metrics are automatically captured from your Compute Engine\ninstances. However, these\n[automatically collected Compute Engine metrics](/monitoring/api/metrics_gcp_c#gcp-compute)\nmight not provide you with all the information\nthat you need to monitor your services.\n\nTo collect additional system metrics from your Compute Engine instances,\ninstall an agent. For example,\nthe [Ops Agent metrics](/monitoring/api/metrics_opsagent) include those for CPU, disk, memory,\nand swap. These metrics, and others, can be collected from your\nLinux and Windows VMs.\n\nFor agent information, see [Google Cloud Observability agents](/monitoring/agent).\n\nMetrics from integrations\n-------------------------\n\nCloud Monitoring provides integrations that let you collect telemetry\nfrom applications such as Apache\nWeb Server, MySQL, Redis, and others for deployments running on\nCompute Engine and Google Kubernetes Engine:\n\n- When using Compute Engine, third-party telemetry is collected by\n the [Ops Agent](/monitoring/agent/ops-agent).\n\n- When using GKE, third-party telemetry is collected by\n [Google Cloud Managed Service for Prometheus](/stackdriver/docs/managed-prometheus).\n\nIn the Google Cloud console, go to the\n**Integrations**\npage:\n\n[Go to **Integrations**](https://console.cloud.google.com/monitoring/integrations)\n\n\u003cbr /\u003e\n\nIf you use the search bar to find this page, then select the result whose subheading is\n**Monitoring**.\n\nMetrics you define\n------------------\n\n\nYou can instrument your application so that it collects\napplication-specific information. Several open-source\ninstrumentation frameworks let you collect metrics, logs, and\ntraces from your application and send that data to any vendor,\nincluding Google Cloud. To instrument your application, we recommend that you use a\nvendor-neutral instrumentation framework that is open source, such as\n[OpenTelemetry](https://opentelemetry.io/), instead of\nvendor- and product-specific APIs or client libraries.\n\nFor information about instrumenting your applications by using\nvendor-neutral instrumentation frameworks, see\n[Instrumentation and observability](/stackdriver/docs/instrumentation/overview).\n\nYou can instrument your application by using a client library\nor the [Cloud Monitoring API](/monitoring/docs/apis).\nFor more information about these\napproaches, see [User-defined metrics overview](/monitoring/custom-metrics).\n\nMetrics derived from logs\n-------------------------\n\nGoogle Cloud supports creating metrics from log data. These\n*log-based metrics* record numeric information about\nthe logs written to [Cloud Logging](/logging/docs).\nSome metrics, such as the total number of log entries received by your\nGoogle Cloud project, are automatically derived from your logs.\nYou can also define log-based metrics. For example, you might\ncreate a metric that counts the number of `404 Not Found` errors\nfor an application deployed to App Engine.\n\nFor more information, see [Log-based metrics overview](/logging/docs/logs-based-metrics).\n\nPricing\n-------\n\nIn general, Cloud Monitoring system metrics are free, and metrics\nfrom external systems, agents, or applications are not. Billable metrics are\nbilled by either the number of bytes or the number of samples ingested.\n\nFor more information, see the Cloud Monitoring sections of the [Google Cloud Observability pricing](https://cloud.google.com/stackdriver/pricing) page."]]