Reports & Exports
import { Aside } from ‘@astrojs/starlight/components’;
GreenKube provides powerful reporting capabilities for regulatory compliance (CSRD/ESRS E1), cost analysis, and sustainability tracking.
Report Types
Section titled “Report Types”On-Demand Reports
Section titled “On-Demand Reports”Generate instant reports via the CLI:
# Daily report (last 24 hours)greenkube report --daily
# Last 7 daysgreenkube report --last 7d
# Last 3 months, grouped monthlygreenkube report --last 3m --monthly
# Custom date rangegreenkube report --start 2024-01-01 --end 2024-03-31 --monthlyContinuous Collection
Section titled “Continuous Collection”When running as a service (greenkube start), metrics are collected continuously and stored in the database. Reports can then query any historical period.
Report Data
Section titled “Report Data”Each report includes per-pod data:
| Metric | Unit | Description |
|---|---|---|
| Energy | Joules | Estimated energy consumption |
| CO₂e | grams | Carbon dioxide equivalent emissions |
| Cost | USD | Allocated infrastructure cost |
| CPU Usage | millicores | Actual CPU utilization |
| CPU Request | millicores | Requested CPU resources |
| Memory Usage | bytes | Actual memory consumption |
| Memory Request | bytes | Requested memory |
| Network Rx/Tx | bytes | Network traffic in/out |
| Disk Read/Write | bytes | Disk I/O |
| Storage | bytes | Ephemeral storage usage |
| Restarts | count | Container restart count |
| Node | — | Node name and instance type |
| Zone | — | Carbon zone (Electricity Maps) |
Export Formats
Section titled “Export Formats”Table (Default)
Section titled “Table (Default)”Rich terminal tables with color-coded values:
greenkube report --dailyComma-separated values for spreadsheet analysis:
greenkube report --last 7d --format csv -o weekly-report.csvStructured JSON for programmatic processing:
greenkube report --last 30d --format json -o monthly-report.jsonTime Range Syntax
Section titled “Time Range Syntax”The --last flag supports flexible time units:
| Syntax | Meaning |
|---|---|
1h | Last 1 hour |
6h | Last 6 hours |
24h | Last 24 hours |
1d | Last 1 day |
7d | Last 7 days |
30d | Last 30 days |
1m | Last 1 month |
3m | Last 3 months |
6m | Last 6 months |
1y | Last 1 year |
Grouping Options
Section titled “Grouping Options”Group results for trend analysis:
| Option | Description |
|---|---|
--daily | One row per pod per day |
--monthly | One row per pod per month |
--yearly | One row per pod per year |
Filtering
Section titled “Filtering”Focus reports on specific workloads:
# By namespacegreenkube report --last 7d -n production
# By pod name patterngreenkube report --last 7d --pod "api-*"CSRD / ESRS E1 Compliance
Section titled “CSRD / ESRS E1 Compliance”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
API-Based Reports
Section titled “API-Based Reports”For automated reporting, use the REST API:
# Get metrics summarycurl "http://localhost:8000/api/v1/metrics/summary?last=30d"
# Get time-series data for chartscurl "http://localhost:8000/api/v1/metrics/timeseries?granularity=day&last=30d"
# Get per-pod metricscurl "http://localhost:8000/api/v1/metrics?namespace=production&last=7d"See the API Reference for complete endpoint documentation.