Skip to content

Commit 0d0ca5f

Browse files
authored
Merge pull request #2187 from vprashar2929/chore-ml-cfg
chore: add metricLevel to sample config
2 parents 642029c + 9734b33 commit 0d0ca5f

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

docs/configuration/configuration.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ You can configure Kepler by passing flags when starting the service. The followi
2727
| `--debug.pprof` | Enable pprof debugging endpoints | `false` | `true`, `false` |
2828
| `--exporter.stdout` | Enable stdout exporter | `false` | `true`, `false` |
2929
| `--exporter.prometheus` | Enable Prometheus exporter | `true` | `true`, `false` |
30+
| `--metrics` | Metrics levels to export (can be specified multiple times) | `node,process,container,vm,pod` | `node`, `process`, `container`, `vm`, `pod` |
3031
| `--kube.enable` | Monitor kubernetes | `false` | `true`, `false` |
3132
| `--kube.config` | Path to a kubeconfig file | `""` | Any valid file path |
3233
| `--kube.node-name` | Name of kubernetes node on which kepler is running | `""` | Any valid node name |
@@ -48,6 +49,12 @@ kepler --exporter.stdout=true --exporter.prometheus=false
4849

4950
# Enable Kubernetes monitoring with specific kubeconfig and node name
5051
kepler --kube.enable=true --kube.config=/path/to/kubeconfig --kube.node-name=my-node
52+
53+
# Export only node and container level metrics
54+
kepler --metrics=node --metrics=container
55+
56+
# Export only process level metrics
57+
kepler --metrics=process
5158
```
5259

5360
## 🗂️ Configuration File
@@ -80,6 +87,12 @@ exporter:
8087
debugCollectors:
8188
- go
8289
- process
90+
metricsLevel:
91+
- node
92+
- process
93+
- container
94+
- vm
95+
- pod
8396

8497
debug: # debug related config
8598
pprof: # pprof related config
@@ -169,6 +182,12 @@ exporter:
169182
debugCollectors:
170183
- go
171184
- process
185+
metricsLevel:
186+
- node
187+
- process
188+
- container
189+
- vm
190+
- pod
172191
```
173192

174193
- **stdout**: Configuration for the stdout exporter
@@ -177,6 +196,12 @@ exporter:
177196
- **prometheus**: Configuration for the Prometheus exporter
178197
- `enabled`: Enable or disable the Prometheus exporter (default: true)
179198
- `debugCollectors`: List of debug collectors to enable (available: "go", "process")
199+
- `metricsLevel`: List of metric levels to expose. Controls the granularity of metrics exported:
200+
- `node`: Node-level metrics (system-wide power consumption)
201+
- `process`: Process-level metrics (per-process power consumption)
202+
- `container`: Container-level metrics (per-container power consumption)
203+
- `vm`: Virtual machine-level metrics (per-VM power consumption)
204+
- `pod`: Pod-level metrics (per-pod power consumption in Kubernetes)
180205

181206
### 🐞 Debug Configuration
182207

hack/config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ exporter:
3636
debugCollectors:
3737
- go
3838
- process
39+
metricsLevel:
40+
- node
41+
- process
42+
- container
43+
- vm
44+
- pod
3945

4046
debug: # debug related config
4147
pprof: # pprof related config

0 commit comments

Comments
 (0)