agent remove

758 views
Skip to first unread message

MNB_1101

unread,
Oct 12, 2021, 12:51:57 AM10/12/21
to Wazuh mailing list

Hi team

One of my agents is removed from the server and added again with a new id and its previous events are deleted. The following message was seen in the server log.

2021/10/11 18:38:26 wazuh-authd: INFO: Duplicated name 'Agent Name' (015). Removing old agent.

Hanes Nahuel Sciarrone

unread,
Oct 12, 2021, 10:10:26 AM10/12/21
to Wazuh mailing list
Hi mnb,

Thank you for using Wazuh and sharing your question with the community. There are 2 ways to delete the agent which are through the API or CLI. For example, if you want to delete the agent from the API you can use "Dev Tools" option of the Kibana app or do it from the Linux console.
delete-agent.jpg
If you want to use CLI mode, you should open the terminal as root on the manager side and run the following command:

/var/ossec/bin/manage_agents -r 002

You should change the 002 to your agent ID.

I would like to know the process you followed to remove the agent to help you.

Best regards
Hanes

Hanes Nahuel Sciarrone

unread,
Oct 12, 2021, 10:51:13 AM10/12/21
to Wazuh mailing list
Hi mnb,

In the email, I had a mistake. I sent you an image where the API output corresponds to GET /agents. The correct output of API command DELETE /agents?pretty=true&older_than=0s&agents_list=003&status=all is here

delete-api.jpg

I apologize for my mistake.

Best regards
Hanes
Reply all
Reply to author
Forward
0 new messages