Configure metrics collection

Apigee hybrid metrics collection is disabled by default; you must provide a few configuration properties in your overrides file to enable hybrid to send the collected metrics data to Stackdriver.

Required configuration

To enable Apigee hybrid to send collected metrics data to Stackdriver, you must provide these configuration settings in your overrides file:

...

# 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

Where:

  • gcpProjectID identifies the Google Cloud project where apigee-logger and the apigee-metrics push their data.
  • gcp-region identifies the GCP region where the apigee-logger and the apigee-metrics push their data.
  • gcp-project-id identifies the Google Cloud project where apigee-logger and the apigee-metrics push their data.
  • serviceAccountPath is the path on your filesystem to the GCP service account key file that was downloaded during the Apigee hybrid installation procedure. 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 accounts.

Example:

...

# 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

How to disable metrics collection

To disable metrics collection, add the following configuration to your overrides and apply it to the cluster:

...
metrics:
  enabled: false
...