Kepler

Uses eBPF to probe energy related system stats and exports as Prometheus metrics.
https://github.com/sustainable-computing-io/kepler

Category: Consumption
Sub Category: Computation and Communication

Keywords

cloud-native energy-consumption energy-efficiency energy-monitor kubernetes prometheus prometheus-exporter sustainability

Keywords from Contributors

ebpf operator model-server online-machine-learning stream-processing tensorflow-io tensorflow2 alerting

Last synced: about 19 hours ago
JSON representation

Repository metadata

Kepler (Kubernetes-based Efficient Power Level Exporter) is a Prometheus exporter that measures energy consumption metrics at the container, pod, and node levels in Kubernetes clusters.

README.md

Kepler

GitHub license codecov CI Status Releases zread OpenSSF Best Practices OpenSSF Scorecard

Kepler (Kubernetes-based Efficient Power Level Exporter) is a Prometheus exporter that measures energy consumption metrics at the container, pod, and node level in Kubernetes clusters.

🚀 Major Rewrite: Kepler (0.10.0 and above)

Important Notice: Starting with version 0.10.0, Kepler has undergone a complete ground-up rewrite.
This represents a significant architectural improvement while maintaining the core mission of
accurate energy consumption monitoring for cloud-native workloads.

📢 Read the full announcement: CNCF Slack Announcement

✨ What's New in the Rewrite

Enhanced Performance & Accuracy:

  • Dynamic detection of Nodes' RAPL zones - no more hardcoded RAPL zones
  • More accurate power attribution based on active CPU usage (no more idle/dynamic for workloads)
  • Improved VM, Container, and Pod detection with more meaningful label values
  • Significantly reduced resource usage compared to old Kepler

Reduced Security Requirements:

  • Requires only readonly access to host /proc and /sys
  • No more CAP_SYSADMIN or CAP_BPF capabilities required
  • Much fewer privileges than previous versions

Modern Architecture:

  • Service-oriented design with clean separation of concerns
  • Thread-safe operations throughout the codebase
  • Graceful shutdown handling with proper resource cleanup
  • Comprehensive error handling with structured logging

Current Limitations:

  • Only supports Baremetal (platform power support in roadmap)
  • Supports only RAPL/powercap framework
  • No GPU power support yet

📚 Migration & Legacy Support

For New Users: Use the current version (0.10.0+) for the best experience and latest features.

For Existing Users: If you need to continue using the old version:

  • Pin your deployment to version 0.9.0 (final legacy release)
  • Access the old codebase in the archived branch
  • Important: The legacy version (0.9.x and earlier) is now frozen - no bug fixes or feature requests will be accepted for the old version

Migration Note: Please review the new configuration format and deployment methods below when upgrading to 0.10.0+.

🚀 Getting Started

📖 For comprehensive installation instructions, troubleshooting, and advanced deployment options, see our Installation Guide

⚡ Quick Start (Kubernetes with Helm)

# 1. Install Kepler using Helm from OCI registry
helm install kepler oci://quay.io/sustainable_computing_io/charts/kepler \
  --namespace kepler \
  --create-namespace

# Wait for Kepler pods to be running
kubectl wait --for=condition=ready --timeout=120s pod -n kepler --all

# 2. Verify installation
kubectl get pods -n kepler

# 3. Access metrics (port-forward)
kubectl port-forward -n kepler svc/kepler 28282:28282

# Test metrics endpoint
curl http://localhost:28282/metrics | grep kepler_node_cpu_watts

📋 For Production Deployments: Consider using the Kepler Operator for advanced lifecycle management and operational capabilities.

Next Steps:

To ensure Kepler is working correctly and to visualize the metrics:

Need Help?

🔧 Other Installation Methods

Choose your preferred method:

# 💻 Local Development
make build && sudo ./bin/kepler

# ✨ Docker Compose (with Prometheus & Grafana)
cd compose/dev && docker-compose up -d

# 🐳 Kubernetes with Kustomize
kubectl kustomize manifests/k8s | \
  sed -e "s|<KEPLER_IMAGE>|quay.io/sustainable_computing_io/kepler:latest|g" | \
  kubectl apply --server-side --force-conflicts -f -

📖 Documentation

User Documentation

Developer Documentation

For more detailed documentation, please visit the official Kepler documentation.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For more detailed information about contributing to this project, please refer to our CONTRIBUTING.md file.

Gen AI policy

Our project adheres to the Linux Foundation's Generative AI Policy, which can be viewed at https://www.linuxfoundation.org/legal/generative-ai.

⭐ Star History

Star History Chart

📝 License

This project is licensed under the Apache License 2.0 - see the LICENSES for details.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 10 days ago

Total Commits: 289
Total Committers: 13
Avg Commits per committer: 22.231
Development Distribution Score (DDS): 0.554

Commits in past year: 289
Committers in past year: 13
Avg Commits per committer in past year: 22.231
Development Distribution Score (DDS) in past year: 0.554

Name Email Commits
vprashar2929 v****9@g****m 129
Sunil Thaha s****a@r****m 97
Vimal Kumar v****8@g****m 26
dependabot[bot] 4****] 10
Sunyanan Choochotkaew s****1@i****m 7
Kaiyi Liu k****u@r****m 6
SamYuan1990 y****9@1****m 5
Ray Huang b****g@c****w 3
Witek Bedyk w****k@s****m 2
laurall974 1****4 1
SMC242 5****2 1
Pat Riehecky r****y@f****v 1
Andrea Lamparelli a****5@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 589
Total pull requests: 2,309
Average time to close issues: 2 months
Average time to close pull requests: 9 days
Total issue authors: 127
Total pull request authors: 67
Average comments per issue: 3.92
Average comments per pull request: 1.6
Merged pull request: 1,748
Bot issues: 1
Bot pull requests: 329

Past year issues: 74
Past year pull requests: 595
Past year average time to close issues: 2 months
Past year average time to close pull requests: 5 days
Past year issue authors: 28
Past year pull request authors: 19
Past year average comments per issue: 1.14
Past year average comments per pull request: 1.44
Past year merged pull request: 400
Past year bot issues: 0
Past year bot pull requests: 85

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/sustainable-computing-io/kepler

Top Issue Authors

  • rootfs (88)
  • jichenjc (56)
  • SamYuan1990 (48)
  • sunya-ch (43)
  • vprashar2929 (40)
  • sthaha (36)
  • dave-tucker (26)
  • marceloamaral (14)
  • jharriga (10)
  • jiere (10)
  • KaiyiLiu1234 (9)
  • vimalk78 (9)
  • nikimanoledaki (8)
  • husky-parul (8)
  • williamcaban (7)

Top Pull Request Authors

  • vprashar2929 (360)
  • dependabot[bot] (318)
  • rootfs (290)
  • sthaha (286)
  • SamYuan1990 (190)
  • vimalk78 (141)
  • jichenjc (115)
  • sunya-ch (100)
  • marceloamaral (100)
  • dave-tucker (93)
  • maryamtahhan (82)
  • KaiyiLiu1234 (48)
  • husky-parul (17)
  • github-actions[bot] (11)
  • jiere (10)

Top Issue Labels

  • kind/bug (171)
  • wontfix (123)
  • kind/feature (112)
  • kind/documentation (20)
  • enhancement (18)
  • help wanted (12)
  • to be closed (8)
  • discussion (7)
  • bug (7)
  • urgent-priority (5)
  • high-priority (5)
  • good first issue (5)
  • tech-debt (5)
  • non-k8s environment (4)
  • pinned (4)
  • kind/nomination (3)
  • documentation (3)
  • low-priority (3)
  • github_actions (2)
  • metal-ci (2)
  • medium (1)
  • dependencies (1)
  • model-server (1)
  • model-db (1)
  • gh-action (1)

Top Pull Request Labels

  • dependencies (326)
  • go (168)
  • github_actions (141)
  • chore (140)
  • ci (64)
  • feat (52)
  • docs (40)
  • fix (33)
  • wontfix (27)
  • refactor (15)
  • test (10)
  • requires-manual-test (9)
  • enhancement (9)
  • bug (8)
  • do-not-merge (5)
  • kind/feature (4)
  • high-priority (2)
  • documentation (1)
  • github-actions (1)
  • urgent-priority (1)
  • breaking-change (1)
  • proposal (1)

Package metadata

proxy.golang.org: github.com/sustainable-computing-io/kepler

  • Homepage: https://github.com/sustainable-computing-io/kepler
  • Documentation: https://pkg.go.dev/github.com/sustainable-computing-io/kepler#section-documentation
  • Licenses: Apache-2.0
  • Latest release: v0.7.12 (published about 1 year ago)
  • Last Synced: 2024-12-14T10:50:24.449Z (about 1 year ago)
  • Versions: 64
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Docker Downloads: 361
  • Rankings:
    • Docker downloads count: 1.984%
    • Stargazers count: 3.177%
    • Forks count: 3.353%
    • Average: 4.352%
    • Dependent repos count: 4.79%
    • Dependent packages count: 8.456%

Dependencies

.github/workflows/commitMsg.yml actions
  • gsactions/commit-message-checker v2 composite
.github/workflows/image.yml actions
  • actions/checkout v3 composite
  • actions/setup-go main composite
  • docker/login-action v1 composite
.github/workflows/integration_test.yml actions
  • actions/checkout main composite
  • actions/setup-go main composite
  • sustainable-computing-io/kepler-action main composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/checkout v3 composite
  • actions/create-release v1 composite
  • actions/github-script v5 composite
  • docker/login-action v1 composite
  • peterjgrainger/action-create-branch v2.2.0 composite
.github/workflows/unit_test.yml actions
  • actions/checkout v2 composite
  • actions/setup-go main composite
  • ad-m/github-push-action master composite
  • tj-actions/coverage-badge-go v2 composite
  • tj-actions/verify-changed-files v11.1 composite
build/Dockerfile docker
  • quay.io/sustainable_computing_io/kepler_base cuda-11.8.0-base-ubi8-bcc-0.24 build
  • quay.io/sustainable_computing_io/kepler_builder ubi-8.6-bcc-0.24-go1.18 build
go.mod go
  • github.com/NVIDIA/go-nvml v0.11.6-0
  • github.com/iovisor/gobpf v0.2.0
  • github.com/jszwec/csvutil v1.6.0
  • github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369
  • github.com/onsi/ginkgo v1.16.5
  • github.com/onsi/gomega v1.19.0
  • github.com/prometheus/client_golang v1.12.1
  • github.com/prometheus/client_model v0.2.0
  • github.com/prometheus/common v0.34.0
  • github.com/stretchr/testify v1.7.1
  • golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6
  • k8s.io/api v0.24.0
go.sum go
  • 576 dependencies
.github/workflows/daily.yml actions
.github/workflows/developer_local.yml actions
  • actions/checkout v4 composite
  • actions/setup-go v3 composite
.github/workflows/golang.yml actions
  • actions/checkout v4 composite
  • actions/setup-go v3 composite
  • actions/setup-go v2 composite
  • golangci/golangci-lint-action v3 composite
.github/workflows/gosec.yml actions
  • actions/checkout v4 composite
  • github/codeql-action/upload-sarif v1 composite
  • securego/gosec master composite
.github/workflows/image_base.yml actions
  • actions/checkout v4 composite
  • docker/build-push-action v3 composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
.github/workflows/image_pr.yml actions
  • actions/checkout v4 composite
  • docker/build-push-action v4 composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
.github/workflows/integration_test_libbpf.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/setup-go v3 composite
  • actions/upload-artifact v3 composite
  • sustainable-computing-io/kepler-action v0.0.1 composite
.github/workflows/platform-validation.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/setup-go v3 composite
  • actions/upload-artifact v3 composite
  • docker/build-push-action v4 composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
  • sustainable-computing-io/kepler-action v0.0.1 composite
.github/workflows/pull_request.yml actions
.github/workflows/push.yml actions
.github/workflows/scorecard.yml actions
  • actions/checkout 93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 composite
  • actions/upload-artifact 3cea5372237819ed00197afe530f5a7ea3e805c8 composite
  • github/codeql-action/upload-sarif 17573ee1cc1b9d061760f3a006fc4aac4f944fd5 composite
  • ossf/scorecard-action e38b1902ae4f44df626f11ba0734b14fb91f8f86 composite

Score: 15.825776443595934