Statistics
Compute uptime percentages, downtime, and incident counts over a rolling period.
Statistics turn raw incidents and heartbeats into the numbers people actually read: uptime percentage, total downtime, and how often the service flapped. You request them over a rolling period, and Vanta computes them from resolved incidents.
Periods
The period is a duration string made of a number and a unit. Use d for days and h for hours:
| Period | Meaning |
|---|---|
24h | The last 24 hours |
7d | The last 7 days |
30d | The last 30 days |
90d | The last 90 days |
What you get back
A statistics response summarizes the monitor over the period:
uptimePercentage: share of the period the monitor was up.downtimeMs: total milliseconds of downtime.incidentCount: how many incidents occurred.currentStatus: the monitor's live status.lastHeartbeat: when the monitor last reported in.
Requesting statistics
const stats = await vanta.uptime.getStats('mon_abc123', '7d')The response describes how the monitor behaved over the period:
{
"data": {
"uptimePercentage": 99.94,
"downtimeMs": 362000,
"incidentCount": 2,
"currentStatus": "up",
"lastHeartbeat": "2026-08-27T09:30:00.000Z"
}
}Reading the numbers
Uptime is computed from resolved downtime, so a monitor that is currently down but has no resolved incident for the period may still show a high percentage. Treat currentStatus as the live truth and the percentage as a trailing summary. For alerting, watch currentStatus or open incidents rather than the percentage, which lags by the length of the period.