Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get metrics from multiple projects #132

Open
sandyydk opened this issue Jul 14, 2021 · 2 comments
Open

How to get metrics from multiple projects #132

sandyydk opened this issue Jul 14, 2021 · 2 comments

Comments

@sandyydk
Copy link

What if I had a service account which had access to multiple projects and wanted to scrape GCP metrics for all of those projects? Currently we are able to get metrics only for the parent project and not other projects where we have access to.

/gcp_stackdriver_exporter/stackdriver_exporter --monitoring.metrics-type-prefixes loadbalancing.googleapis.com/

How to do that? How to use the roles/permissions of a service account to get metrics from other projects other than just adding those project names?

@dmichel1
Copy link

You should just be able to add --google.project-id project-a,projectb as an argument.

https://github.com/prometheus-community/stackdriver_exporter#flags describes it more.

@sandyydk
Copy link
Author

You should just be able to add --google.project-id project-a,projectb as an argument.

https://github.com/prometheus-community/stackdriver_exporter#flags describes it more.

This is a problem as it would mean that if an account has access to say 30 other accounts with role to obtain metrics, we would need to add all those account names to the flag and restart the exporter service. Would be convenient if we could get all metrics of all the projects to which we have access to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants