Views: 47
To upgrade agents using the command line, use the agent_upgrade tool as follows:
List all the agents with outdated software:
/var/ossec/bin/agent_upgrade -l
[root@wazuh-server wazuh-user]# /var/ossec/bin/agent_upgrade -l
ID Name Version
001 zyberpatrol-pdc Wazuh v4.7.1
Upgrade the agent with ID 001 using the ‘-a’ parameter followed by the agent ID:
/var/ossec/bin/agent_upgrade -a 001
[root@wazuh-server wazuh-user]# /var/ossec/bin/agent_upgrade -a 001
Upgrading…
Upgraded agents:
Agent 001 upgraded: Wazuh v4.7.1 -> Wazuh v4.7.3
The agent is automatically restarted after the upgrade. Verify the agent version to ensure it has been properly upgraded using the below command:
/var/ossec/bin/agent_control -i 001
[root@wazuh-server wazuh-user]# /var/ossec/bin/agent_control -i 001
Wazuh agent_control. Agent information:
Agent ID: 001
Agent Name: zyberpatrol-pdc
IP address: any
Status: Active
Operating system: Microsoft Windows Server 2022 Standard Evaluation
Client version: Wazuh v4.7.3
Configuration hash: ab73af41699f13fdd81903b5f23d8d00
Shared file hash: 4a8724b20dee0124ff9656783c490c4e
Last keep alive: 1712982456
Syscheck last started at: Sat Apr 13 04:26:16 2024
Syscheck last ended at: Sat Apr 13 04:26:43 2024