title: "Disk full projection" description: "Get warned before a disk fills up — BoxWatch projects each mount's full date from recent growth." last_updated: "2026-05-24"

Disk full projection

A disk that fills up at 3am ruins your week. BoxWatch projects when each disk will hit 100% based on recent growth, so you have time to add space or trim files.

How it works

For each server, the API runs a linear regression on the last 7 days of disk usage samples:

  • y = disk percent used.
  • x = sample timestamp (Unix seconds).
  • The slope of the fit, scaled to % per day, is the growth rate.
  • Days remaining = (100 - current_percent) / slope_per_day.

If the slope is zero or negative (steady or shrinking), there's no projected full date — it returns null.

The result includes a data_quality flag:

  • good — at least 7 days of samples.
  • limited — between 24 hours and 7 days. Projection runs but may be noisy.
  • insufficient — under 24 hours. No projection.

You can see the live numbers in the dashboard's server detail page, under Disk projection. Sample API response:

{
  "disk_projection": {
    "days_until_full": 12.4,
    "slope_per_day": 0.32,
    "current_disk": 96.0,
    "data_quality": "good"
  }
}

When does it alert?

A disk_projection alert fires when days_until_full < 14. There's a single threshold — no separate warning vs. critical tiers. The alert clears the next time the projection moves back above 14 days (for example, after a log rotation).

Maintenance windows suppress projection alerts the same way they suppress everything else. See Maintenance windows.

What it won't catch

This is a smoothed linear projection over a week of data. It cannot model:

  • Log rotation that runs every Sunday — Saturday's projection looks bad, Sunday's looks fine.
  • Scheduled cleanups ("we trim CDN caches every 6 hours").
  • Step jumps — a big import landing in a single hour will pull the slope up, but the projection still assumes the same rate continues.
  • Plateau behavior — disks that idle near 70% for months and then spike are not caught by a 7-day window.

Treat the projected days as a heuristic. If the dashboard says "full in 12 days," go look at the recent disk graph and decide whether to act.

Mounts under 70% used aren't interesting — they don't trip the alert even if their growth rate is high. Once they cross 70%, the projection starts mattering.

How the agent reports disk

The agent runs df -h / and df -h /mnt/... on every tick. It reports the percent-used integer for the root mount, and the first /mnt/* mount if one exists. Other mounts (data volumes on non-standard paths) aren't reported in v1.

If you need projection for a volume the agent doesn't pick up, mount it under /mnt and re-run the agent.

Tuning

There are no per-server tunable thresholds in v1. The 14-day window is fixed in alertChecker.js. If you want a different sensitivity, the workaround is to use a custom webhook handler and apply your own logic to the disk_projection alert's days_until_full value.

A per-server threshold is on the roadmap.

Was this page helpful?