alarm: mem_eta_critical
on: system_monitor.mem_runway
lookup: average -30s unaligned of eta_seconds
calc: $this
crit: $this < 90 || $runway_pct < 8 || $psi_full_avg10 >= 20
delay: down 30s multiplier 1.5 max 10m
hysteresis: 10%
exec: /usr/local/bin/agentctl alarm --name mem_eta_critical --status CRITICAL --value "$this"
to: system-monitor

alarm: mem_eta_warn
on: system_monitor.mem_runway
lookup: average -60s unaligned of eta_seconds
calc: $this
warn: $this < 360
delay: down 60s multiplier 1.5 max 10m
hysteresis: 10%
exec: /usr/local/bin/agentctl alarm --name mem_eta_warn --status WARNING --value "$this"
to: system-monitor
