Chapter 5. Configuring power monitoring
Power monitoring is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
The PowerMonitor
resource is a Kubernetes custom resource definition (CRD) that enables you to configure the deployment and monitor the status of the PowerMonitor
resource.
5.1. The Kepler configuration Copy linkLink copied to clipboard!
You can configure Kepler with the spec
field of the PowerMonitor
resource.
Ensure that the name of your PowerMonitor
instance is power-monitor
. All other instances are rejected by the Power Monitoring Operator Webhook.
The following is the list of configuration options:
Name | Description | Default Behavior |
---|---|---|
deployment.nodeSelector | The nodes on which Kepler (created by PowerMonitor) pods are scheduled. | kubernetes.io/os: linux |
deployment.tolerations | The tolerations for Power Monitor that allow the pods to be scheduled on nodes with specific characteristics. | - operator: "Exists" |
deployment.security.mode |
Security mode can be set to either |
Set to |
deployment.security.allowedSANames |
A list of Service Account Names that can access Kepler’s metrics endpoint when security mode is |
In OpenShift, set to |
config.logLevel | The level of logs to expose by Kepler. | Set to info. |
config.metricLevels |
A list of energy metric levels to expose. Possible values include |
The default list includes |
config.staleness | Specifies how long to wait before considering calculated power values as stale. | 500ms (500 milliseconds). |
config.sampleRate | Specifies the interval for monitoring resources such as processes, containers, and VMs. | 5s (5 seconds). |
config.maxTerminated | Controls terminated workload tracking. A negative value tracks unlimited workloads, zero disables tracking, and a positive value tracks the top N terminated workloads by energy consumption. | 500. |
Example PowerMonitor
resource with default configuration
5.2. Monitoring the Kepler status Copy linkLink copied to clipboard!
You can monitor the state of the Kepler exporter with the status
field of the PowerMonitor
resource.
The status
field includes information, such as the following:
- The number of nodes currently running the Kepler pods
- The number of nodes that should be running the Kepler pods
- Conditions representing the health of the Kepler resource
This provides you with valuable insights into the changes made through the spec
field.
Example state of the PowerMonitor
resource