You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the following error when using the credentials of the GCP service account from a project different than where custom-metrics-stackdriver-adapter runs.
provider.go:271] Failed request to stackdriver api: googleapi: Error 403: Permission monitoring.metricDescriptors.list denied (or the resource may not exist)., forbidden
I've confirmed that GOOGLE_APPLICATION_CREDENTIALS is set correctly in the container and the service account has enough permissions to read metrics. The way I validated them was to swap the custom-metrics-stackdriver-adapter image with google/cloud-sdk and successfully got a list of metrics back from within an interactive shell in the container
# metrics-and-alarms is the project ID where metrics live
curl -H "Authorization: Bearer \"$(gcloud auth application-default print-access-token)\"" https://monitoring.googleapis.com/v3/projects/metrics-and-alarms/metricDescriptors
Here's the Kubernetes template I use. Did I mis-config anything?
The text was updated successfully, but these errors were encountered:
beyondbill
changed the title
custom-metrics-sd-adapter: failed to fetch metrics from another project
custom-metrics-sd-adapter: 403s when fetching metrics from another project
Jul 19, 2022
I got the following error when using the credentials of the GCP service account from a project different than where
custom-metrics-stackdriver-adapter
runs.I've confirmed that
GOOGLE_APPLICATION_CREDENTIALS
is set correctly in the container and the service account has enough permissions to read metrics. The way I validated them was to swap thecustom-metrics-stackdriver-adapter
image with google/cloud-sdk and successfully got a list of metrics back from within an interactive shell in the containerHere's the Kubernetes template I use. Did I mis-config anything?
The text was updated successfully, but these errors were encountered: