Adventure Labs Logo
Scout Docs

Heartbeats

Table for recording device heartbeat timestamps to monitor device connectivity

Column NameData TypeConstraints
idbigintNOT NULL
created_attimestamp with time zoneDEFAULT now() NOT NULL
timestamptimestamp with time zoneNOT NULL
device_idbigintNOT NULL

Security Policies (RLS)

RLS enabled. Herd scope: Herd from heartbeats.device_id → get_herd_id_by_device_id.

Operationhas_herd_ability ability keyOther paths
SELECTtelemetry.readOwning device API key
INSERTtelemetry.writeOwning device API key
UPDATEtelemetry.writeOwning device API key
DELETEtelemetry.writeOwning device API key

Platform superadmin: FOR ALL bypass where defined.

analyze_device_heartbeats, analyze_herd_device_heartbeats, and get_herd_uptime_summary require telemetry.read in the herd (or the device's own key for analyze_device_heartbeats), platform superadmin, or the service role.

On this page