21 lines
662 B
YAML
21 lines
662 B
YAML
# GC taking too much time per cycle
|
|
- alert: HighGCPauseTime
|
|
expr: rate(go_gc_duration_seconds_sum[5m]) / rate(go_gc_duration_seconds_count[5m]) > 0.01
|
|
for: 10m
|
|
annotations:
|
|
summary: "Average GC pause >10ms — reduce allocations or tune GOGC"
|
|
|
|
# Goroutine leak
|
|
- alert: GoroutineLeak
|
|
expr: go_goroutines > 10000
|
|
for: 5m
|
|
annotations:
|
|
summary: "Goroutine count >10K — check for leaked goroutines"
|
|
|
|
# Memory approaching container limit
|
|
- alert: MemoryNearLimit
|
|
expr: predict_linear(process_resident_memory_bytes[1h], 3600) > <container_limit_bytes>
|
|
for: 15m
|
|
annotations:
|
|
summary: "RSS projected to exceed container limit within 1h"
|