---
title: "Warn before resources run out · Agent Wranglers"
url: https://agentwranglers.se/playbook/operations/capacity-and-resilience/exhaustion-alerts
id: OPS-42
level: Required
risk: outage
updated: 2026-10-27
build: a2a6bdfed830
tokens: 890
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Warn before resources run out

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Capacity and resilience](https://agentwranglers.se/playbook/operations/capacity-and-resilience.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: OPS-42
- Level: Required
- Chapter: [Capacity and resilience](https://agentwranglers.se/playbook/operations/capacity-and-resilience.md)
- Rule: Alert on how soon a disk, memory pool or quota will be full, not only on how full it is.
- Check: Fill a test disk on staging at a steady rate. The page fires at least 1 hour before it is full.
- Risk: The app down or unusable
- 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/application-security/cryptography-and-keys/certificate-renewal.md) sets, and on domains 30 days before renewal.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Plain text example

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

## Sources

- [Google SRE book, Monitoring Distributed Systems](https://sre.google/sre-book/monitoring-distributed-systems/)
- [Prometheus alerting practices](https://prometheus.io/docs/practices/alerting/)

## Related rules

- DAT-36 [Pool database connections](https://agentwranglers.se/playbook/data/operations/connection-pooling.md) in Data and databases
- APS-102 [Renew certificates automatically](https://agentwranglers.se/playbook/application-security/cryptography-and-keys/certificate-renewal.md) in Application security
- OPS-65 [Cap the size of container logs](https://agentwranglers.se/playbook/operations/containers/container-log-rotation.md) in Operations and observability
- SCL-14 [Cap the cache server's memory and choose its eviction](https://agentwranglers.se/playbook/scaling/caching/cache-memory-and-eviction.md) in Scaling
- SCL-36 [Watch size and growth](https://agentwranglers.se/playbook/scaling/growing-the-database/capacity.md) in Scaling
- MED-29 [Watch data sent out per file and per owner](https://agentwranglers.se/playbook/files-and-media/quotas-and-cost/egress-alerts.md) in Files and media
- EVT-8 [Cap and watch replication slots](https://agentwranglers.se/playbook/events/publishing-events/replication-slot-limits.md) in Integration and events

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/operations/capacity-and-resilience/exhaustion-alerts">Agent Wranglers operations and observability playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Size the runtime's memory to the box](https://agentwranglers.se/playbook/operations/capacity-and-resilience/runtime-memory-limits.md)
- Next: [Run production in two zones or more](https://agentwranglers.se/playbook/operations/capacity-and-resilience/multiple-zones.md)
- [Capacity and resilience](https://agentwranglers.se/playbook/operations/capacity-and-resilience.md)
