{"id":36762735,"url":"https://github.com/7onn/gcp-idleness-exporter","last_synced_at":"2026-01-12T12:57:21.639Z","repository":{"id":40571272,"uuid":"476290719","full_name":"7onn/gcp-idleness-exporter","owner":"7onn","description":"Identify unused resources at Google Cloud Platform through Prometheus' metrics","archived":false,"fork":false,"pushed_at":"2025-07-21T19:29:34.000Z","size":128,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-21T21:31:00.672Z","etag":null,"topics":["gcp","google-cloud","google-cloud-platform","monitoring","monitoring-tools","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/7onn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-03-31T12:13:55.000Z","updated_at":"2025-07-21T19:27:09.000Z","dependencies_parsed_at":"2023-07-18T00:48:15.724Z","dependency_job_id":null,"html_url":"https://github.com/7onn/gcp-idleness-exporter","commit_stats":null,"previous_names":["7onn/gcp-idle-resources-metrics"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/7onn/gcp-idleness-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7onn%2Fgcp-idleness-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7onn%2Fgcp-idleness-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7onn%2Fgcp-idleness-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7onn%2Fgcp-idleness-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/7onn","download_url":"https://codeload.github.com/7onn/gcp-idleness-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7onn%2Fgcp-idleness-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcp","google-cloud","google-cloud-platform","monitoring","monitoring-tools","prometheus"],"created_at":"2026-01-12T12:57:21.576Z","updated_at":"2026-01-12T12:57:21.627Z","avatar_url":"https://github.com/7onn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gcp-idleness-exporter\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![.github/workflows/main.yaml](https://github.com/7onn/gcp-idleness-exporter/actions/workflows/main.yaml/badge.svg)](https://github.com/7onn/gcp-idleness-exporter/actions/workflows/main.yaml)\n[![Release](https://github.com/7onn/gcp-idleness-exporter/actions/workflows/release.yaml/badge.svg)](https://github.com/7onn/gcp-idleness-exporter/actions/workflows/release.yaml)\n\nIdentify unused resources at Google Cloud Platform through Prometheus' metrics\n\n\n## Usage\n\nSet up a service account on the project you want to monitor. To comprehend all collectors' required permissions, you have to grant: \n- `roles/compute.viewer`\n- `roles/dataproc.viewer`\n\nYou can authenticate by setting the [Application Default Credentials](https://developers.google.com/accounts/docs/application-default-credentials) (i.e: Placing the service account's JSON key and setting the environment variable `GOOGLE_APPLICATION_CREDENTIALS=path-to-credentials.json`) or letting the application automatically load the credentials from metadata ([Workload Identity](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity) is recommended).\n\nYou must set at least the project ID and the regions you want to monitor. Either by: \n- Specifying through command args `--project_id  --regions us-east1,us-central1`  \n- Specifying through environment variables `GCP_PROJECT_ID= GCP_REGIONS=us-east1,us-central1` (if authenticating through metadata, the project doesn't need to be specified)\n\n\n## Development building and running\nPrerequisites:\n* [Go compiler](https://golang.org/dl/)\n\nBuilding:\n```bash\nmake build\n```\n\nRunning:\n```bash\n./server -h\n./server --project-id=x --regions=us-central1,us-east1\n```\n\nRunning tests\n```bash\nmake test\n```\n## Collectors\n\nCurrent supported APIs:\n- Google Compute Engine\n  - [Instances](https://console.cloud.google.com/compute/instances)\n  - [Disks](https://console.cloud.google.com/compute/disks)\n  - [Snapshots](https://console.cloud.google.com/compute/snapshots)\n- Dataproc\n  - [Clusters](https://console.cloud.google.com/dataproc/clusters)\n\nTo enable only some specific collector(s):\n```bash\n./server --collector.disable-defaults --collector.gce_is_disk_attached --collector.gce_disk_snapshot\n```\n\n\n## Available metrics\nVisit our [wiki](https://github.com/7onn/gcp-idleness-exporter/wiki/Available-metrics) for more information.\n\n\n### Docker\n```bash\ncp ~/.config/gcloud/application_default_credentials.json ./credentials.json\n\nchmod 444 credentials.json\n\ndocker build -t gcp-idleness-exporter . \n\ndocker run -it --rm --network=host \\\n  -v $(pwd)/credentials.json:/credentials.json \\\n  -e GOOGLE_APPLICATION_CREDENTIALS=/credentials.json \\\n  -e GCP_PROJECT_ID= \\\n  -e GCP_REGIONS=us-east1,us-central1,southamerica-east1 \\\n  gcp-idleness-exporter\n```\nCheck the exported [metrics](http://localhost:5000/metrics).\n\n\n### Kubernetes\nAdd the Chart repository\n```bash\nhelm repo add 7onn https://www.7onn.dev/helm-charts\nhelm search repo 7onn\n```\n\nExport its default values\n```bash\nhelm show values 7onn/gcp-idleness-exporter \u003e values.yaml\n```\n\nEdit the values according to your needs then install the application\n```bash\nhelm upgrade -i gcp-idleness-exporter --values values.yaml 7onn/gcp-idleness-exporter\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7onn%2Fgcp-idleness-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F7onn%2Fgcp-idleness-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7onn%2Fgcp-idleness-exporter/lists"}