Skip to content

Commit

Permalink
fix an error with autoscaler alert rules
Browse files Browse the repository at this point in the history
the new rules for the resource limits failed to include the time unit
for the range vector, this change fixes that.
  • Loading branch information
elmiko committed Oct 5, 2022
1 parent cdc4952 commit 1d97476
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/clusterautoscaler/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ true then the cluster autoscaler will enter an unsafe to scale state until the c
},
{
Alert: "ClusterAutoscalerUnableToScaleCPULimitReached",
Expr: intstr.FromString("increase(cluster_autoscaler_skipped_scale_events_count{direction=\"up\",reason=\"CpuResourceLimit\"}[15]) > 0"),
Expr: intstr.FromString("increase(cluster_autoscaler_skipped_scale_events_count{direction=\"up\",reason=\"CpuResourceLimit\"}[15m]) > 0"),

For: "15m",
Labels: map[string]string{
Expand All @@ -214,7 +214,7 @@ cluster autoscaler (default 320000 cores). Limits can be adjusted by modifying t
},
{
Alert: "ClusterAutoscalerUnableToScaleMemoryLimitReached",
Expr: intstr.FromString("increase(cluster_autoscaler_skipped_scale_events_count{direction=\"up\",reason=\"MemoryResourceLimit\"}[15]) > 0"),
Expr: intstr.FromString("increase(cluster_autoscaler_skipped_scale_events_count{direction=\"up\",reason=\"MemoryResourceLimit\"}[15m]) > 0"),
For: "15m",
Labels: map[string]string{
"severity": "info",
Expand Down

0 comments on commit 1d97476

Please sign in to comment.