agent_upgrade
New in version 3.0.0.
The agent_upgrade program allows you to list outdated agents and upgrade them.
Note
In case of having a multi-node Wazuh cluster, agent_upgrade must be executed on the node where the agent is connected.
Note
Since v4.1.0, the upgrade procedure is performed by the Agent upgrade module and the agent_upgrade script can be executed on any node.
|
Display the help message. |
|
Generates a list with all outdated agents. |
|
Agent IDs to upgrade. |
|
Allows reinstall same version and downgrade version. |
|
Do not show output. |
|
Version to install. |
|
Specify a repository URL. |
|
Custom WPK filename. |
|
Executable filename in the WPK custom file. By default it will try to launch upgrade.sh. |
Note
By default, the timeout will be the maximum allowed by the agent with the execd.max_restart_lock
option in internal_options.conf.
Examples
List outdated agents:
# agent_upgrade -l
ID Name Version
002 VM_Debian9 Wazuh v3.13.2
003 VM_Debian8 Wazuh v3.13.2
009 VM_WinServ2016 Wazuh v3.10.1
Total outdated agents: 3
Upgrade agent:
# agent_upgrade -a 002
Upgrading...
Upgraded agents:
Agent 002 upgraded: Wazuh v3.13.2 -> 4.0.0
Downgrade agent using a custom repository:
# agent_upgrade -a 002 -dF -v v4.0.0 -r http://mycompany.wpkrepo.com/
Upgrading...
Upgraded agents:
Agent 002 upgraded: Wazuh v3.13.2 -> 4.0.0
Install custom WPK file:
# agent_upgrade -a 002 -d -f /root/upgrade_openscap_debian.wpk -x install.sh
Upgrading...
Upgraded agents:
Agent 002 upgraded: Wazuh v3.13.2 -> 4.0.0
Note
When the agent finishes updating, it is automatically restarted to apply the new configuration.