La recopilación de métricas de Apigee hybrid está inhabilitada de forma predeterminada. Debes proporcionar algunas propiedades de configuración en tu archivo de anulaciones para permitir que los híbridos envíen los datos de métricas recopilados a Stackdriver.
Configuración necesaria
Para permitir que Apigee Hybrid envíe datos de métricas recopiladas a Stackdriver, debes proporcionar estos parámetros de configuración a tu archivo de anulaciones:
gcpProjectID es el ID del proyecto de GCP. Los datos de las métricas se enviarán a la instancia de Stackdriver en ese proyecto.
k8sClusterName es el nombre del clúster de Kubernetes en el que está instalado el entorno de ejecución híbrido.
serviceAccountPath es la ruta de tu sistema de archivos al archivo de claves de la cuenta de servicio de GCP que se descargó durante el procedimiento de instalación de Apigee Hybrid.
La cuenta de servicio asociada con la clave debe tener la función Escritor de métricas de supervisión. Para obtener detalles sobre cómo crear cuentas de servicio, consulta Paso 5: Agrega cuentas de servicio.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-28 (UTC)"],[[["\u003cp\u003eThe current Apigee hybrid documentation version (1.1) is end-of-life and an upgrade to a newer version is required.\u003c/p\u003e\n"],["\u003cp\u003eApigee hybrid metrics collection is disabled by default and must be explicitly enabled through configuration.\u003c/p\u003e\n"],["\u003cp\u003eEnabling metrics collection requires specifying the GCP project ID, Kubernetes cluster name, and the path to a service account key file with the Monitoring Metrics Writer role in the overrides file.\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.1 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...\ngcpProjectID: project_ID\nk8sClusterName: cluster_name\n...\nmetrics:\n enabled: true\n serviceAccountPath: service_account_file\n```\n\n\nWhere:\n\n- `gcpProjectID` is a GCP project ID. Metrics data will be sent to the Stackdriver instance in that project.\n- `k8sClusterName` is the name of the Kubernetes cluster where the hybrid runtime is installed.\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.1/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.1/precog-serviceaccounts).\n\n\nExample: \n\n```\n...\ngcpProjectID: acme-hybrid\nk8sClusterName: acme-hybrid\n...\nmetrics:\n enabled: true\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```text\n...\nmetrics:\n enabled: false\n...\n```"]]