Skip to content

Kepler (Kubernetes-based Efficient Power Level Exporter) uses eBPF to probe energy related system stats and exports as Prometheus metrics

License

Notifications You must be signed in to change notification settings

ruomengh/kepler

 
 

Repository files navigation

GitHub Workflow Status (event) Coverage

GitHub

Twitter URL

kepler

Kepler (Kubernetes Efficient Power Level Exporter) uses eBPF to probe energy related system stats and exports as Prometheus metrics

Architecture

Architecture

Talk and Demo

Open Source Summit NA 2022 talk and demo

Requirement

Kernel 4.18+

Installation and Configuration for Prometheus

Prerequisites

Need access to a Kubernetes cluster.

Deploy the Kepler exporter

Deploying the Kepler exporter as a daemonset to run on all nodes. The following deployment will also create a service listening on port 9102.

# build manifests file for VM+Baremetal and Baremetal only
# manifests are created in  _output/manifests/kubernetes/generated/ by default
# kubectl v1.21.0 is minimum version that support build manifest
# make build-manifest

if you are running with Baremetal only

kubectl create -f _output/manifests/kubernetes/generated/bm/deployment.yaml

if you are running with Baremetal and/or VM

kubectl create -f _output/manifests/kubernetes/generated/vm/deployment.yaml

Deploy the Prometheus operator and the whole monitoring stack

  1. Clone the kube-prometheus project to your local folder.
# git clone https://github.com/prometheus-operator/kube-prometheus
  1. Deploy the whole monitoring stack using the config in the manifests directory. Create the namespace and CRDs, and then wait for them to be available before creating the remaining resources
# cd kube-prometheus
# kubectl apply --server-side -f manifests/setup
# until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
# kubectl apply -f manifests/

Configure Prometheus to scrape Kepler-exporter endpoints.

# cd ../kepler
# kubectl create -f manifests/kubernetes/keplerExporter-serviceMonitor.yaml

Sample Grafana dashboard

Import the pre-generated Kepler Dashboard into grafana Sample Grafana dashboard

To start developing Kepler

To set up a development environment please read our Getting Started Guide

About

Kepler (Kubernetes-based Efficient Power Level Exporter) uses eBPF to probe energy related system stats and exports as Prometheus metrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 84.1%
  • Shell 11.4%
  • Makefile 2.1%
  • C 1.8%
  • Other 0.6%