Open
Description
⚠ subissue for coder/coder #15746
Disk and memory usage are fetched from the agents. On the other hand, the processing and triggering of notifications is done on the Control Plane side (Coderd) - meaning that we need to modify the AgentAPI to include a new method, pushing these data.
Parts of the ticket are to :
Create a new ticker that will be initialised when agent starts
At each tick, fetch the resources used
If enough points have been fetched - use the AgentAPI to push the datapoints to the CP.
No logic of debouncing or processing is done on the Agent side, which keeps it very simple.
This tickets scope ends when the agent is fully modified, also the AgentAPI and the CP has a method receiving the data, even without doing anything from it.