📈 HPA monitor
An HPA (Horizontal Pod Autoscaler) changes the number of Pods when load changes. This monitor alerts only when scaling is failing and the HPA stays at its maximum for a sustained period.
Watches for HorizontalPodAutoscalers that are stuck at max replicas for a sustained period with scaling errors.
How detection works
- kwatch lists all HPAs in watched namespaces
- Checks if
status.currentReplicas ≥ spec.maxReplicas(at max capacity) - Checks if scaling is blocked or failing (e.g. resource metrics unavailable)
- Only alerts if the condition persists beyond
sustainedMinutes - Resolves when the HPA scales down or scaling errors clear
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
hpaMonitor.enabled | bool | true | Enable HPA monitoring. |
hpaMonitor.sustainedMinutes | int | 20 | Minutes the HPA must be at max replicas before alerting. |
Configuration fragment
Add this fragment through kwatch.sh's Configure settings flow, or merge it
into the configuration file used by your existing supported installation:
hpaMonitor:
enabled: true
sustainedMinutes: 20
What triggers an alert
- HPA at
maxReplicaswith scaling failures (resource metrics unavailable, timeout, etc.) - Sustained for
sustainedMinutes(default 20 min) — avoids noise from temporary spikes
What does NOT trigger an alert
- HPA at
maxReplicaswith no scaling errors (normal — you've reached your max, that's expected) - HPA scaling up successfully (kwatch only alerts on failures)