You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blocker: no. This can wait until the agent stack is merged. It goes on top of #39 in the same stack.
Part of contract v0.4.0, section "2026-09-24 — Peaks, pressure and disk activity": "The readings" and "The peaks".
Defect
The agent reads the server one time each minute, at the tick.
cpu_percent and the network traffic are values for the whole minute. A short spike becomes an average: 10 seconds at 100% CPU and 50 seconds idle send about 17%.
The memory and swap values come from one moment. A spike between two ticks is not visible.
Cost
A minute chart does not show the peaks within the minute.
A person cannot see why a site was slow for some seconds.
Benefit of the fix
The agent reads the server each 10 seconds. It still sends one sample for each minute.
Each sample carries the highest 10-second value of the minute. The fields of contract v0.3.1 do not change, so the alerts do not change.
Fix
Read the server at the tick and each 10 seconds after the tick: six readings for each minute.
Keep each 10-second window, from one reading to the next. If a reading fails, join the two windows on each side of it.
Add the optional sample fields cpu_max_percent, memory_used_max_bytes, swap_used_max_bytes, net_in_max_bytes_per_second and net_out_max_bytes_per_second.
Send null for the network peaks when net_counters_reset is true, or when a counter of a window went back.
Make sure that each peak is not less than the value of the minute.
Before a dev release sends the new fields, send one report to a control plane of contract v0.3.1. Make sure that the answer is 200, not 400.
Completion checks
The agent reads the server six times each minute, and sends one sample each minute.
A reading that fails joins two windows. The sample still goes.
The first sample after a start has peaks equal to the values of the minute.
cpu_percent ≤ cpu_max_percent, memory_used_bytes ≤ memory_used_max_bytes ≤ memory_total_bytes, and the same for swap.
A control plane of contract v0.3.1 accepts a sample with the new fields.
Activity
feat(agent): read the server each 10 seconds and send the peaks of th…
[-]Send the peaks within each minute[/-][+]feature: Send the peaks within each minute[/+]