Given a table called system_health with a ping_time column, construct an aggregate of system liveness for 10 days
starting from Jan 1, 2022. This assumes a system is unhealthy if it hasn’t been heard from in a 5 minute window.
The column containing the timestamps of the heartbeats
agg_start
TIMESTAMPTZ
-
✔
The start of the time range over which this aggregate is tracking liveness
agg_duration
INTERVAL
-
✔
The length of the time range over which this aggregate is tracking liveness. Any point in this range that doesn’t closely follow a heartbeat is considered to be dead
heartbeat_liveness
INTERVAL
-
✔
How long the system is considered to be live after each heartbeat