interpolated_downtime().
Samples
Given a table calledliveness containing weekly heartbeat aggregates in column health with timestamp column date,
use the following to get the total downtime of the system during the week of Jan 9, 2022.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get the total time dead during a heartbeat aggregate
interpolated_downtime().
liveness containing weekly heartbeat aggregates in column health with timestamp column date,
use the following to get the total downtime of the system during the week of Jan 9, 2022.
SELECT downtime(health)
FROM liveness
WHERE date = '01-9-2022 UTC'
downtime
--------
00:04:25
downtime(
agg HEARTBEATAGG
) RETURNS INTERVAL
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| agg | HeartbeatAgg | - | ✔ | A heartbeat aggregate to get the liveness data from |
| Column | Type | Description |
|---|---|---|
| downtime | INTERVAL | The sum of all the dead ranges in the aggregate. |