What does `predict_linear()` do?

IntermediateConceptPromQL & Recording Rules
Answer

It fits a linear regression over a range of a gauge and predicts the value N seconds ahead. Classic use, disk filling within 4 hours:

predict_linear(node_filesystem_avail_bytes{fstype!~"tmpfs|overlay"}[6h], 4 * 3600) < 0

Combine with a minimum free-space condition to avoid alerts on brief write bursts. deriv() gives the per-second slope of a gauge (do not use rate() on gauges).

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on PromQL & Recording Rules