mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
As requested for [this issue](https://github.com/coder/internal/issues/245) we need to have a new resource `resources_monitoring` in the agent. It needs to be parsed from the provisioner and inserted into a new db table.
17 lines
588 B
SQL
17 lines
588 B
SQL
CREATE TABLE workspace_agent_memory_resource_monitors (
|
|
agent_id uuid NOT NULL REFERENCES workspace_agents(id) ON DELETE CASCADE,
|
|
enabled boolean NOT NULL,
|
|
threshold integer NOT NULL,
|
|
created_at timestamp with time zone NOT NULL,
|
|
PRIMARY KEY (agent_id)
|
|
);
|
|
|
|
CREATE TABLE workspace_agent_volume_resource_monitors (
|
|
agent_id uuid NOT NULL REFERENCES workspace_agents(id) ON DELETE CASCADE,
|
|
enabled boolean NOT NULL,
|
|
threshold integer NOT NULL,
|
|
path text NOT NULL,
|
|
created_at timestamp with time zone NOT NULL,
|
|
PRIMARY KEY (agent_id, path)
|
|
);
|