List, identify, and kill agents
Current situation
Agents may die while still being registered. This situation (a stale agent) is handled by the agentchannel
plugin, but over time this may lead to unnecessary resource usage.
Desired outcome
A way to list registered agents, and a way to deregister unwanted ones.
Analysis
The agentchannel
API allows for listing registered agents and for agent deregistration. The endpoints are available, but there is no user-faced interface.
Solution
Add a get agents
command and a delete agent _
command to opentf-ctl
.