Hello Le Sok,
First of all, I strongly recommend figuring out why this agent is disconnecting and fix it if possible.Check logs on the agent's side.
Secondly, and answering your question:
1. You can get the list of agents in the server running /var/ossec/bin/agent_control -l
2. If you know the agent ID, you can restart it remotely from the server running the command /var/ossec/bin/agent_control -R -u <agent_id>
3. You can restart all agents running the command /var/ossec/bin/agent_control -R -a
In the third place, you are facing a paradox. Because if the agent disconnects, you can't restart it remotely. It seems there is something wrong with the agent.
Again , I strongly recommend figuring out why this agent is disconnecting and fix it if possible.
Thank you, please come back with any feedback.
Regards,
Jorge Marino. Wazuh Core Team.