Metrics and the disk forecast
Yawl keeps what each app and each machine uses: minute detail for 7 days, hour detail for 90 days.
What is sampled, and how
Every minute, each agent samples three sources:
- Each app container (anything with a
yawl.servicelabel): its CPU in % of one core, so 250% means two and a half cores, and its memory without the page cache. These are the numbersdocker statsshows. - The machine: CPU in % of all cores, used memory (total minus available), the disk used on
/, and the load average. - Each web host: from Caddy’s own metrics, the requests, the 5xx answers and the 95th percentile answer time. The agent turns these on in Caddy by itself. Requests are summed per service over its free host and its custom domains. A host Yawl does not route is not counted.
The agent keeps the last 60 minutes. The panel asks for new samples every minute, so a panel that was down for less than an hour loses nothing. A minute nobody could sample is a gap in the graph, never a zero.
Where to look
- A service’s Metrics tab shows CPU, Memory, and for web services Requests (with 5xx) and Response time p95. CPU is in percent of one core, so a busy app on a 4 core server can show up to 400%. The axis is on round steps, the newest value is at the top right, and pointing at the line reads one point. The ranges are 1 hour, 24 hours, 7 days and 90 days. 7 and 90 days use hour rows:
- CPU, memory and p95 are each hour’s highest minute, so a short burst still shows;
- requests are summed. Hour rows folded before this change hold the CPU average; they age out after 90 days.
- The Servers page shows each machine’s last 24 hours as three small graphs, and under the disk bar where the disk is heading:
Disk 61% full, growing 2.1 GB a day: full in about 23 days.Disk 61% full, not growing.- in red when it is a week or less.
Alerts
- The disk forecast. A straight line (least squares) is fitted through the last 7 days of hourly disk use. It needs at least 24 hours of samples. Growth of 0.1 GB a day or less counts as not growing. When the line reaches the disk’s size within 7 days:
hel1 disk will be full in about 5 days at this rate (+2.1 GB a day).It closes withhel1 disk is no longer on course to fill within a week.- The 85% and 95% alerts stay as they were.
- Memory. Ten minutes in a row at or above 90%:
hel1 memory has been above 90% for 10 minutes (top: acme/production/api 1.2 GB).It closes withhel1 memory is back under 85%.- A minute nobody sampled starts the count again.
- CPU, answer time and the 5xx rate are graphs only, never alerts.
With the watcher deployed, these messages leave from the Worker like every other incident.
GB here are 10⁹ bytes.