Skip to content
GreenKube

Reports & Exports

import { Aside } from ‘@astrojs/starlight/components’;

GreenKube provides powerful reporting capabilities for regulatory compliance (CSRD/ESRS E1), cost analysis, and sustainability tracking.

Generate instant reports via the CLI:

Terminal window
# Daily report (last 24 hours)
greenkube report --daily
# Last 7 days
greenkube report --last 7d
# Last 3 months, grouped monthly
greenkube report --last 3m --monthly
# Custom date range
greenkube report --start 2024-01-01 --end 2024-03-31 --monthly

When running as a service (greenkube start), metrics are collected continuously and stored in the database. Reports can then query any historical period.

Each report includes per-pod data:

MetricUnitDescription
EnergyJoulesEstimated energy consumption
CO₂egramsCarbon dioxide equivalent emissions
CostUSDAllocated infrastructure cost
CPU UsagemillicoresActual CPU utilization
CPU RequestmillicoresRequested CPU resources
Memory UsagebytesActual memory consumption
Memory RequestbytesRequested memory
Network Rx/TxbytesNetwork traffic in/out
Disk Read/WritebytesDisk I/O
StoragebytesEphemeral storage usage
RestartscountContainer restart count
NodeNode name and instance type
ZoneCarbon zone (Electricity Maps)

Rich terminal tables with color-coded values:

Terminal window
greenkube report --daily

Comma-separated values for spreadsheet analysis:

Terminal window
greenkube report --last 7d --format csv -o weekly-report.csv

Structured JSON for programmatic processing:

Terminal window
greenkube report --last 30d --format json -o monthly-report.json

The --last flag supports flexible time units:

SyntaxMeaning
1hLast 1 hour
6hLast 6 hours
24hLast 24 hours
1dLast 1 day
7dLast 7 days
30dLast 30 days
1mLast 1 month
3mLast 3 months
6mLast 6 months
1yLast 1 year

Group results for trend analysis:

OptionDescription
--dailyOne row per pod per day
--monthlyOne row per pod per month
--yearlyOne row per pod per year

Focus reports on specific workloads:

Terminal window
# By namespace
greenkube report --last 7d -n production
# By pod name pattern
greenkube report --last 7d --pod "api-*"

GreenKube reports are designed to support CSRD (Corporate Sustainability Reporting Directive) requirements, specifically ESRS E1 (Climate Change):

  • Scope 3 emissions — Cloud infrastructure carbon footprint
  • Energy consumption — Detailed breakdown by workload
  • Time-series data — Historical trends for year-over-year comparison
  • Data provenance — Clear flagging of estimated vs. measured values

For automated reporting, use the REST API:

Terminal window
# Get metrics summary
curl "http://localhost:8000/api/v1/metrics/summary?last=30d"
# Get time-series data for charts
curl "http://localhost:8000/api/v1/metrics/timeseries?granularity=day&last=30d"
# Get per-pod metrics
curl "http://localhost:8000/api/v1/metrics?namespace=production&last=7d"

See the API Reference for complete endpoint documentation.