uptime would consider the
interval between the start of the interval and the first heartbeat as dead.
Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| agg | HeartbeatAgg | - | ✔ | A heartbeat aggregate to get the liveness data from |
| pred | HeartbeatAgg | - | The heartbeat aggregate for the interval before the one being measured, if one exists |
Returns
| Column | Type | Description |
|---|---|---|
| interpolated_uptime | INTERVAL | The sum of all the live ranges in the aggregate, including those covered by the last heartbeat of the previous interval |
Samples
Given a table calledliveness containing weekly heartbeat aggregates in column health with timestamp column date,
use this command to get the total interpolated uptime of the system during the week of Jan 9, 2022.