Bagian ini menjelaskan properti konfigurasi untuk mengirim data metrik campuran Apigee ke Cloud Operations.
Pengumpulan metrik diaktifkan secara default. Lihat juga Ringkasan pengumpulan metrik.
$GCP_REGION mengidentifikasi region GCP tempat apigee-logger dan apigee-metrics mendorong datanya.
$GCP_PROJECT_ID mengidentifikasi project Google Cloud tempat apigee-logger dan apigee-metrics mendorong data mereka.
$SERVICE_ACCOUNT_PATH adalah jalur di sistem file Anda ke file kunci akun layanan GCP yang didownload selama prosedur penginstalan Apigee hybrid.
Akun layanan yang terkait dengan kunci harus memiliki peran Monitoring Metrics Writer. Untuk mengetahui detail tentang cara membuat akun layanan, lihat Langkah 5: Menambahkan akun layanan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 UTC."],[[["\u003cp\u003eThis documentation is for Apigee hybrid version 1.7, which is no longer supported and requires an upgrade.\u003c/p\u003e\n"],["\u003cp\u003eApigee hybrid can send metrics data to Cloud Operations, and this feature is enabled by default.\u003c/p\u003e\n"],["\u003cp\u003eConfiguring metrics collection requires specifying the GCP region, project ID, and the service account path within the overrides file.\u003c/p\u003e\n"],["\u003cp\u003eThe service account used for metrics collection must have the Monitoring Metrics Writer role assigned to it.\u003c/p\u003e\n"],["\u003cp\u003eMetrics collection can be disabled by setting the \u003ccode\u003emetrics: enabled\u003c/code\u003e property to \u003ccode\u003efalse\u003c/code\u003e in the overrides file.\u003c/p\u003e\n"]]],[],null,["# Configure metrics collection\n\n| You are currently viewing version 1.7 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\n\nThis section describes configuration properties for sending Apigee hybrid metrics data to\n[Cloud Operations](https://cloud.google.com/monitoring/kubernetes-engine/).\nMetrics collection is enabled by default. See also [Metrics collection overview](./metrics-collection).\n\nRequired configuration\n----------------------\n\nThe following overrides file settings configure metrics collection: \n\n```actionscript-3\ngcp:\n region: $GCP_REGION\n projectID: $GCP_PROJECT_ID\n\nmetrics:\n serviceAccountPath: $SERVICE_ACCOUNT_PATH\n```\n\n\nWhere:\n\n- `$GCP_REGION` identifies the GCP [region](https://cloud.google.com/compute/docs/regions-zones#available) where the `apigee-logger` and the `apigee-metrics` push their data.\n- `$GCP_PROJECT_ID` identifies the project where `apigee-logger` and the `apigee-metrics` push their data.\n- `$SERVICE_ACCOUNT_PATH` is the path on your filesystem to the GCP service account key file that was downloaded during the Apigee hybrid [installation procedure](/apigee/docs/hybrid/v1.7/precog-overview). The service account associated with the key must have the **Monitoring Metrics Writer** role. For details on creating service accounts, see [Step 5: Add service\n accounts](/apigee/docs/hybrid/v1.7/precog-serviceaccounts).\n\n\nExample: \n\n```actionscript-3\ngcp:\n region: us-central1\n projectID: acme-project\n\nmetrics:\n serviceAccountPath: ./service-accounts/metrics-sa.json\n```\n\nHow to disable metrics collection\n---------------------------------\n\nTo disable metrics collection, add the following configuration to your overrides and apply it\nto the cluster:\n\n```actionscript-3\nmetrics:\n enabled: false\n```\n\n*[Google Cloud]: Google Cloud"]]