Hello Andréw,
My name is Ezequiel and I will be helping you with your issue.
You have several ways to verify if the agent has been successfully upgraded,
The first one should be to verify if you have this (or any other) agents outdated with
GET /agents/outdated on the API console.
A second way could be on your manager's machine terminal console to use
/var/ossec/bin/agent_control -i agent.id, you will see something similar to this screen:

Also, you can verify the
upgrade.log located on
/var/ossec/upgrade/ on Linux-based agents or in x:\Program Files (x86)\ossec-agent\upgrade on Windows-based agents. There, you will be able to see if anything went wrong during the update or if it failed.
Finally, you can manually proceed to upgrade the agent on your manager's machine terminal console using
/var/ossec/bin/agent_upgrade -i agent.id Just some notes on this:
- If you have a multi-node Wazuh cluster, this must be executed on the node where the agent is connected.
- Since v4.1.0, this is performed by the agent-update module so this can be executed on any node.
After you use this, the agent will be automatically restarted, and then you can attempt to use
/var/ossec/bin/agent_control -i agent.id to see if it was successfully updated.
This also can be done from the agent machine, you can follow these quick steps for CentOS:
1. Import the GPG key.
rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH2. Add the Wazuh repository.
cat > /etc/yum.repos.d/wazuh.repo << EOF
[wazuh]
gpgcheck=1
gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH
enabled=1
name=EL-\$releasever - Wazuh
baseurl=https://packages.wazuh.com/4.x/yum/
protect=1
EOF
3. Clean the YUM cache.
`yum clean all`4. Upgrade the Wazuh agent.
yum upgrade wazuh-agent5. Disable the Wazuh repository in order to avoid undesired upgrades:
sed -i "s/^enabled=1/enabled=0/" /etc/yum.repos.d/wazuh.repoYou can find other distributions here:
https://documentation.wazuh.com/current/upgrade-guide/wazuh-agent/linux.htmlOn Windows agents, manual upgrade can be done using the installer as it is indicated here:
https://documentation.wazuh.com/current/upgrade-guide/wazuh-agent/windows.htmlAlternatively, you can restart that agent manually from API console using
PUT /agents/_agent.id_/restart to see if that cleans any error that the agent can have.
Some documentation about this that you might find useful:
https://documentation.wazuh.com/current/user-manual/reference/internal-options.html#agenthttps://documentation.wazuh.com/current/upgrade-guide/wazuh-agent/index.htmlhttps://documentation.wazuh.com/current/user-manual/api/reference.htmlPlease don't hesitate to reach me if you have any further questions or need further assistance.
Thank you.
Ezequiel.