Nesta seção, descrevemos as propriedades de configuração para enviar dados de métricas da Apigee híbrida.
A coleta de métricas é ativada por padrão. Consulte também Visão geral da coleta de métricas.
Configuração necessária
As seguintes configurações de arquivos substituem a coleta de métricas:
$GCP_REGION identifica a região
do GCP para onde o apigee-logger
e o apigee-metrics enviam os dados.
$GCP_PROJECT_ID identifica o projeto do Google Cloud em que apigee-logger e apigee-metrics enviam
dados.
$SERVICE_ACCOUNT_PATH é o caminho no sistema de arquivos para o arquivo de chave
da conta de serviço do GCP que foi salvo durante o procedimento de
instalação da Apigee híbrida.
A conta de serviço associada à chave precisa ter o papel de Gravador de métricas do
Monitoring. Para detalhes sobre como criar contas de serviço, consulte a Etapa 5: adicionar
contas de serviço.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-28 UTC."],[[["\u003cp\u003eThis documentation version 1.5 is end of life and users should upgrade to a newer version as detailed in the supported versions documentation.\u003c/p\u003e\n"],["\u003cp\u003eMetrics collection for Apigee hybrid is enabled by default, and the \u003ccode\u003egcp\u003c/code\u003e and \u003ccode\u003emetrics\u003c/code\u003e sections in the overrides file configure it.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e$GCP_REGION\u003c/code\u003e, \u003ccode\u003e$GCP_PROJECT_ID\u003c/code\u003e, and \u003ccode\u003e$SERVICE_ACCOUNT_PATH\u003c/code\u003e variables specify where the metrics data is sent and which service account is used for writing it.\u003c/p\u003e\n"],["\u003cp\u003eMetrics collection can be disabled by setting \u003ccode\u003emetrics: enabled\u003c/code\u003e to \u003ccode\u003efalse\u003c/code\u003e in the overrides file and then applying the changes to the cluster.\u003c/p\u003e\n"]]],[],null,["# Configure metrics collection\n\n| You are currently viewing version 1.5 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 hybrid.\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.5/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.5/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"]]