---
title: "Warn before resources run out · Agent Wranglers"
url: https://agentwranglers.se/playbook/operations/capacity-and-cost/exhaustion-alerts
updated: 2026-10-20
licence: "All rights reserved"
---

# Warn before resources run out

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Capacity and cost](https://agentwranglers.se/playbook/operations/capacity-and-cost)
- Rule: Alert on how soon a disk, memory pool or quota will be full, not only on how full it is.
- How: Predict from the recent trend, for example with Prometheus `predict_linear`. Page when the disk will fill within 4 hours, and open a ticket when it will fill within 7 days. Alert on TLS certificates as [certificate renewal](https://agentwranglers.se/playbook/website/hosting-and-network/certificate-renewal) sets, and on domains 30 days before renewal.
- Check: Fill a test disk on staging at a steady rate. The page fires at least 1 hour before it is full.

Example:

```text
predict_linear(node_filesystem_avail_bytes{mountpoint="/"}[6h], 4 * 3600) < 0
(probe_ssl_earliest_cert_expiry - time()) / 86400 < 14
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers operations playbook: https://agentwranglers.se/playbook/operations/capacity-and-cost/exhaustion-alerts`.

- Previous: [Size the runtime's memory to the box](https://agentwranglers.se/playbook/operations/capacity-and-cost/runtime-memory-limits)
- Next: [Watch what the service costs](https://agentwranglers.se/playbook/operations/capacity-and-cost/cost-monitoring)
- [Capacity and cost](https://agentwranglers.se/playbook/operations/capacity-and-cost)
