Die Erfassung von Messwerten mit hybriden Messwerten von Apigee ist standardmäßig deaktiviert. Sie müssen einige Konfigurationsattribute in der Überschreibungendatei angeben, damit die erfassten Messwertdaten über Hybrid an Stackdriver gesendet werden können.
Erforderliche Konfiguration
Wenn Sie mit Apigee Hybrid erfasste Messwertdaten an Stackdriver senden möchten, müssen Sie folgende Konfigurationseinstellungen in Ihrer Überschreibungendatei angeben:
...
# gcpProjectID: project_ID # Deprecated.
gcp: # v1.2.0 and later: Use this element instead of gcpProjectID.
region: gcp-region
projectID: gcp-project-id
metrics:
enabled: true
serviceAccountPath: service_account_file
Wobei:
gcpProjectID gibt das Google Cloud-Projekt an, in demapigee-logger und apigee-metrics Daten übertragen.
gcp-region identifiziert die GCP-Region, in der apigee-logger und apigee-metrics Daten übertragen.
gcp-project-id gibt das Google Cloud-Projekt an, in demapigee-logger und apigee-metrics Daten übertragen.
serviceAccountPath ist der Pfad in Ihrem Dateisystem zur Schlüsseldatei des GCP-Dienstkontos, die während des Hybridinstallationsvorgangs von Apigee heruntergeladen wurde.
Das mit dem Schlüssel verknüpfte Dienstkonto muss die Rolle Monitoring-Messwert-Autor haben. Weitere Informationen zum Erstellen von Dienstkonten finden Sie unter Schritt 5: Dienstkonten hinzufügen.
Beispiel:
...
# gcpProjectID: acme-hybrid # Deprecated
gcp: # v1.2.0 and later: Use this element instead of gcpProjectID.
region: us-central1
projectID: acme-project
metrics:
enabled: true
serviceAccountPath: ./service-accounts/metrics-sa.json
Erfassung von Messwerten deaktivieren
Um die Erfassung von Messwerten zu deaktivieren, fügen Sie den Überschreibungen folgende Konfiguration hinzu und wenden sie auf den Cluster an:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-28 (UTC)."],[[["\u003cp\u003eVersion 1.2 of the Apigee hybrid documentation is end of life, and users should upgrade to a newer version.\u003c/p\u003e\n"],["\u003cp\u003eApigee hybrid metrics collection is disabled by default and requires specific configuration properties in the overrides file to enable sending data to Stackdriver.\u003c/p\u003e\n"],["\u003cp\u003eEnabling metrics requires setting \u003ccode\u003emetrics: enabled\u003c/code\u003e to \u003ccode\u003etrue\u003c/code\u003e and providing the correct \u003ccode\u003egcp: region\u003c/code\u003e, \u003ccode\u003egcp: projectID\u003c/code\u003e, and \u003ccode\u003eserviceAccountPath\u003c/code\u003e within the overrides file.\u003c/p\u003e\n"],["\u003cp\u003eTo disable metrics collection, you must set \u003ccode\u003emetrics: enabled\u003c/code\u003e to \u003ccode\u003efalse\u003c/code\u003e in your overrides file and apply the change to your cluster.\u003c/p\u003e\n"]]],[],null,["# Configure metrics collection\n\n| You are currently viewing version 1.2 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\nApigee hybrid metrics collection is disabled by default; you must provide\na few configuration properties in your overrides file to enable hybrid\nto send the collected metrics data to\n[Stackdriver](https://cloud.google.com/monitoring/kubernetes-engine/).\n\nRequired configuration\n----------------------\n\n\nTo enable Apigee hybrid to send collected metrics data to [Stackdriver](https://cloud.google.com/monitoring/kubernetes-engine/),\nyou must provide these configuration settings in your overrides\nfile: \n\n ...\n\n # gcpProjectID: project_ID # Deprecated.\n\n gcp: # v1.2.0 and later: Use this element instead of gcpProjectID.\n region: gcp-region\n projectID: gcp-project-id\n\n metrics:\n enabled: true\n serviceAccountPath: service_account_file\n\n\nWhere:\n\n- `gcpProjectID` identifies the project where `apigee-logger` and the `apigee-metrics` push their data.\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- `serviceAccountPath` 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.2/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.2/precog-serviceaccounts).\n\n\nExample: \n\n ...\n\n # gcpProjectID: acme-hybrid # Deprecated\n\n gcp: # v1.2.0 and later: Use this element instead of gcpProjectID.\n region: us-central1\n projectID: acme-project\n\n metrics:\n enabled: true\n serviceAccountPath: ./service-accounts/metrics-sa.json\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```text\n...\nmetrics:\n enabled: false\n...\n```\n\n*[Google Cloud]: Google Cloud"]]