mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-06-19 16:45:15 +03:00
7 lines
332 B
SQL
7 lines
332 B
SQL
-- name: InsertHeartbeat :exec
|
|
INSERT INTO heartbeats (agent_id, cpu_usage, memory_usage, disk_usage, heartbeat_timestamp)
|
|
VALUES (:agent_id, :cpu_usage, :memory_usage, :disk_usage, :heartbeat_timestamp);
|
|
|
|
-- name: SelectHeartbeatsAfter :many
|
|
SELECT * FROM heartbeats
|
|
WHERE agent_id = :agent_id AND heartbeat_timestamp > :timestamp; |