Skip to content

Exports quota limits and usage for Google Compute Platform services

License

Notifications You must be signed in to change notification settings

chainstack/gcp-quota-exporter

 
 

Repository files navigation

Google Cloud Platform Quota Exporter

Exports limits and usage for metrics available through the GCP APIs (currently only supports Compute Engine).

Usage

  1. Set up a service account in the project you wish to monitor. The account should be given the following permissions:
    • compute.projects.get
    • compute.regions.list
  2. Create a key for the service account, save as a JSON somewhere and set GOOGLE_APPLICATION_CREDENTIALS to its location
  3. Run it and provide a project name:
./gcp-quota-exporter myproject

Docker-compose

  1. Copy the example file and add your project id to it
  2. Change the volume to point to your credentials file if different
  3. Run docker-compose up and you'll have a prometheus instance running at http://localhost:9090 and a gcp-quota-exporter instance running at http://localhost:9592.

Docker

Local Build

docker build -t gcp-quota-exporter .
docker run -it --rm -v $(pwd)/credentials.json:/app/credentials.json gcp-quota-exporter myproject

Official Build

docker run -it --rm -v $(pwd)/credentials.json:/app/credentials.json mintel/gcp-quota-exporter myproject

About

Exports quota limits and usage for Google Compute Platform services

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Go 82.7%
  • Makefile 11.3%
  • Dockerfile 6.0%