{"id":37195365,"url":"https://github.com/superdango/cloud-carbon-exporter","last_synced_at":"2026-01-14T22:43:06.829Z","repository":{"id":274703536,"uuid":"921744944","full_name":"superdango/cloud-carbon-exporter","owner":"superdango","description":"Estimates energy consumption \u0026 CO2 emissions of your ☁️ cloud resources in real-time","archived":false,"fork":false,"pushed_at":"2025-07-08T05:18:25.000Z","size":492,"stargazers_count":7,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-08T06:52:06.027Z","etag":null,"topics":["amazon-web-services","carbon-emissions","carbon-footprint","carbon-footprint-estimation","cloud","energy-consumption","energy-monitor","google-cloud-platform","green-software","prometheus-exporter","scaleway","sustanability","watts"],"latest_commit_sha":null,"homepage":"https://dangofish.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superdango.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-24T14:34:31.000Z","updated_at":"2025-07-08T05:18:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"80a2724d-52ec-42b7-a03e-72115467f29b","html_url":"https://github.com/superdango/cloud-carbon-exporter","commit_stats":null,"previous_names":["i4n-co/cloud-carbon-exporter","superdango/cloud-carbon-exporter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/superdango/cloud-carbon-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdango%2Fcloud-carbon-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdango%2Fcloud-carbon-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdango%2Fcloud-carbon-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdango%2Fcloud-carbon-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superdango","download_url":"https://codeload.github.com/superdango/cloud-carbon-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdango%2Fcloud-carbon-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: 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":["amazon-web-services","carbon-emissions","carbon-footprint","carbon-footprint-estimation","cloud","energy-consumption","energy-monitor","google-cloud-platform","green-software","prometheus-exporter","scaleway","sustanability","watts"],"created_at":"2026-01-14T22:43:06.067Z","updated_at":"2026-01-14T22:43:06.819Z","avatar_url":"https://github.com/superdango.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloud Carbon Exporter\n\nMonitor your cloud's carbon footprint in real-time\n\n![test-build-push badge](https://github.com/superdango/cloud-carbon-exporter/actions/workflows/test-build-push.yaml/badge.svg)\n\nCloud Carbon Exporter automatically discovers cloud resources, estimates energy consumption and carbon emissions in real-time. This tool provides valuable insights for operational and tech teams interested in following the [Carbon-Driven Development](https://dangofish.com/carbon-driven-development) principles.\n\n## Carbon-Driven Development\n\nCarbon-Driven Development (CDD) is a philosophy to build digital services and manage cloud infrastructure with environmental sustainability at its core.\n\nIt revolves around three pillars:\n\n1. **Estimate energy consumption** for each cloud resource (servers, load balancers, storage, etc.)\n2. Collect data in **production environments**\n3. Aggregate data in **real-time**\n\nBy applying these few rules, production teams will be able to:\n\n1. Measure the overall energy efficiency of a system in relation to a business use (active user, transaction, etc.).\n2. Detect infrastructure anomalies **faster**\n3. Engage the company's operational teams and Execs more widely in **continuous improvement**\n4. Reduce the **carbon footprint** of applications\n\n[Check out the original article](https://www.dangofish.com/toward-carbon-driven-development/) which explains in detail the concepts of CDD.\n\n### Demo\n\n![grafana demo cdd](./docs/demo-grafana-cdd.png)\n\nOn the screenshot above, you can visualize and understand easily:\n\n- the estimated energy consumed by connected user to the online service,\n- the current CO2 emissions,\n- the equivalent in turned on lightbulbs.\n\nYou can easily customize the content of this dashboard using the data returned by the exporter.\n\nTry our live demo with our Grafana dashboard: [https://snapshots.raintank.io](https://snapshots.raintank.io/dashboard/snapshot/xbU6hGRemC8oNoO7GWNPqpYPg0ZvDwQP)\n\n## Technical Overview\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./docs/schema-dark.png\"\u003e\n  \u003cimg alt=\"the cloud carbon exporter takes Cloud API to export energy and carbon data to monitoring systems\" src=\"./docs/schema-light.png\"\u003e\n\u003c/picture\u003e\n\n**Multi Cloud** · We want to support as much cloud platforms as possible. From hyperscalers to edge datacenters to regional provider. [List of supported services](https://github.com/superdango/cloud-carbon-exporter/wiki/Supported-Services)\n\n**Dangofish Model** · This tool will prioritize the number of supported resources over the precision of the exported metrics. Estimating precisely the energy consumption of a resource is a hard task. The complexity and opacity of a Cloud service increase the margin of error but trends should be respected. Model calculations are based on public data - mixed with our own hypothesis documented in [primitives model](https://github.com/superdango/cloud-carbon-exporter/blob/main/model/primitives/README.md) and [cloud model](https://github.com/superdango/cloud-carbon-exporter/blob/main/model/cloud/README.md)\n\nOnce the resource energy draw is estimated, the exporter evaluates the carbon intensity of the resource at its location based on [publicly available datasets.](https://github.com/GoogleCloudPlatform/region-carbon-info)\n\n**OpenMetrics** · The exporter is compatible [OpenMetrics](https://prometheus.io/docs/specs/om/open_metrics_spec/) format. Therefore, you can ingest metrics into Prometheus, Datadog and every time series database that support this standard.\n\n**Performance** · We're paying close attention to the exporter performance. Most API requests are done concurrently and cached. Most scrapes finish under 1000ms even with thousand monitored resources.\n\n## Install\n\nYou can download the official Docker Image on the [Github Package Registry](https://github.com/superdango/cloud-carbon-exporter/pkgs/container/cloud-carbon-exporter)\n\n```\n$ docker pull ghcr.io/superdango/cloud-carbon-exporter:latest\n```\n\n## Configuration\n\nThe Cloud Carbon Exporter can work on Google Cloud Platform, Amazon Web Service and Scaleway (more to come).\n\n### Google Cloud Platform\n\n```mermaid\n      sequenceDiagram\n            Prometheus-\u003e\u003ecloud-carbon-exporter: scrape metrics\n            cloud-carbon-exporter-\u003e\u003eAsset Inventory: Query all used resources\n            cloud-carbon-exporter-\u003e\u003eGCP Resources API: Describe Resource\n            cloud-carbon-exporter-\u003e\u003eMonitoring: Get Resource statistics\n            cloud-carbon-exporter--\u003e\u003ePrometheus: Returns Watts and CO2 metrics\n```\n\nThe exporter uses GCP Application Default Credentials:\n\n- `GOOGLE_APPLICATION_CREDENTIALS` environment variable\n- `gcloud auth application-default` login command\n- The attached service account, returned by the metadata server (inside GCP environment)\n\n```\n$ docker run -p 2922 ghcr.io/superdango/cloud-carbon-exporter:latest \\\n        -cloud.provider=gcp \\\n        -cloud.gcp.projectid=myproject\n```\n\n### Amazon Web Services\n\n```mermaid\n      sequenceDiagram\n            Prometheus-\u003e\u003ecloud-carbon-exporter: scrape metrics\n            cloud-carbon-exporter-\u003e\u003eAWS Cost Explorer API: Query used services and regions\n            cloud-carbon-exporter-\u003e\u003eAWS Resources API: Describe Resource\n            cloud-carbon-exporter-\u003e\u003eCloudwatch API: Get Resource statistics\n            cloud-carbon-exporter--\u003e\u003ePrometheus: Returns Watts and CO2 metrics\n```\n\nThe exporter is:\n\n- Environment Variables (`AWS_SECRET_ACCESS_KEY`, `AWS_ACCESS_KEY_ID`, `AWS_SESSION_TOKEN`)\n- Shared Configuration\n- Shared Credentials files.\n\n```\n$ docker run -p 2922 ghcr.io/superdango/cloud-carbon-exporter:latest \\\n        -cloud.provider=aws\n```\n\n### Scaleway\n\n```mermaid\n      sequenceDiagram\n            Prometheus-\u003e\u003ecloud-carbon-exporter: scrape metrics\n            cloud-carbon-exporter-\u003e\u003eRegional APIs: Query all used resources\n            cloud-carbon-exporter-\u003e\u003eCockpit: Get Resource statistics\n            cloud-carbon-exporter--\u003e\u003ePrometheus: Returns Watts and CO2 metrics\n```\n\nConfigure the exporter via:\n\n- Environment Variables (`SCW_ACCESS_KEY`, `SCW_SECRET_KEY`)\n\n```\n$ docker run -p 2922 ghcr.io/superdango/cloud-carbon-exporter:latest \\\n        -cloud.provider=scw\n```\n\n### Deployment\n\nCloud Carbon Exporter can easily run on serverless platform like GCP Cloud Run or AWS Lambda for testing purpose. However, we do recommend running the exporter as a long lived process to keep its cache in memory ([lowering the cost](#additional-cloud-cost))\n\n### Usage\n\n```\nUsage of ./cloud-carbon-exporter:\n  -cloud.aws.defaultregion string\n        aws default region (default \"us-east-1\")\n  -cloud.aws.rolearn string\n        aws role arn to assume\n  -cloud.gcp.projectid string\n        gcp project to explore resources from\n  -cloud.provider string\n        cloud provider type (gcp, aws, scw)\n  -demo.enabled string\n        return fictive demo data (default \"false\")\n  -listen string\n        addr to listen to (default \"0.0.0.0:2922\")\n  -log.format string\n        log format (text, json) (default \"text\")\n  -log.level string\n        log severity (debug, info, warn, error) (default \"info\")\n\nEnvironment Variables:\n  SCW_ACCESS_KEY\n        scaleway access key\n  SCW_SECRET_KEY\n        scaleway secret key\n```\n\n## Additional Cloud Cost\n\nCalls to cloud monitoring APIs can incur additional costs. The exporter will do its best to cache API\nresponses and therefore, lower the impact on your bill. API costs are directly correlated to the number of\nresources the exporter generate data from. Here are the average costs you may observe per resource on your cloud account\nor project (instance, bucket, load balancer) for a 15 minutes cache TTL:\n\n- AWS: $0,06 / month per resource\n- GCP: $0,03 / month per resource (will be 10 times less in October 2025)\n- SCW: free\n\n_The prices shown below are dated March 2025 and are subject to change by the cloud providers._\n\nYou can use the [Cost Calculator file](https://github.com/superdango/cloud-carbon-exporter/raw/refs/heads/main/docs/cloud-carbon-exporter-costs-estimation.xlsx) to do finer estimations with your own inputs.\nIn this file, you can also anticipate the storage cost of carbon metrics if you choose to use the cloud provider monitoring service.\n\n## Permissions \u0026 Security\n\nThe exporter requires permissions to automatically discover resources in your cloud environment. For a quick and easy setup, you can grant it read-only access to your entire cloud platform, such as the `Project Viewer` role or `ViewOnlyAccess` policy.\n\nIf you'd prefer a more precise approach, you can authorize only the specific API calls needed for the services you use. A detailed list of required permissions for each cloud provider service will be available soon.\n\nIf the exporter encounters a missing permission, it will log a warning with details about the issue and increment the `error_count{action=\"collect\"}` value. We recommend periodically monitoring this metric and adjusting permissions as needed to ensure smooth operation.\n\n## Development\n\n    go build \\\n        -o exporter \\\n        github.com/superdango/cloud-carbon-exporter/cmd \u0026\u0026 \\\n        ./exporter -cloud.provider=aws -log.level=debug\n\n## Acknowledgements\n\nWe're grateful for every contribution that helps shape Cloud Carbon Exporter. Whether it's through testing, feedback, or documentation, each effort strengthens our software and enhances the user experience.\n\nWe'd like to extend our heartfelt appreciation to the individuals who have invested significant time and energy into making this project better.\n\n- Thanks to [Hakim Rouatbi](https://github.com/hakro), [Raphaël Cosperec](https://github.com/rcosperec), [Souhail Hanfi](https://github.com/hanfi/), [Jonathan Chardon](https://github.com/helldrum) for giving early feedback.\n\n## Contributing\n\nWe appreciate your input and contributions to Cloud Carbon Exporter. Here's how you can help:\n\n**Share Feedback and Ideas** · Found a bug or have a feature idea? Start a discussion in our GitHub Discussions.\nYour testing and feedback are crucial to improving the project.\n\n**Code Contributions** · We're actively refactoring to improve the codebase. For now, we're focusing on smaller, targeted contributions to ensure a smooth integration.\n\n**Model Contributions** ·\nContribute directly to source model like [Boavizta](https://boavizta.org/) or [Cloud Carbon Footprint](https://www.cloudcarbonfootprint.org/)\n\nThank you for your support!\n\n## Sponsor\n\n[dangofish.com](https://dangofish.com) - Tools and Services for Carbon-Driven Developers.\n\n## Licence\n\nThis software is provided as is, without waranty under [AGPL 3.0 licence](https://www.gnu.org/licenses/agpl-3.0.en.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperdango%2Fcloud-carbon-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperdango%2Fcloud-carbon-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperdango%2Fcloud-carbon-exporter/lists"}