Either the root CA certificate or the certificate used to sign the WPK package must be installed in the agent before running an upgrade.
You have two options to perform this action:
Overwrite the shipped root CA with your certificate. This will prevent your agent from upgrading using WPK packages from Wazuh.# cp /path/to/certificate etc/wpk_root.pem
Add a new certificate by editing the ossec.conf file:<agent-upgrade> <ca_verification> <enabled>yes</enabled> <ca_store>/var/ossec/etc/wpk_root.pem</ca_store> <ca_store>/path/to/certificate</ca_store> </ca_verification> </agent-upgrade>
Run the WPK package from the Wazuh manager:
# /var/ossec/bin/agent_upgrade -a 001 -f path/to/myagent.wpk -x upgrade.sh
-a 001 specifies the agent to upgrade.
-f path/to/myagent.wpk designates the path to the WPK package.
-x upgrade.sh is the name of the upgrading script contained in the package.
To upgrade a Windows agent, you must use
upgrade.bat instead of
Upgrading... Upgraded agents: Agent 001 upgraded: Wazuh v4.2.7 -> Wazuh v4.3.8