Remote upgrading multiple agents

600 views
Skip to first unread message

Robert H

unread,
Mar 11, 2018, 12:22:43 PM3/11/18
to Wazuh mailing list
Hi,
I've used the agent_upgrade program to remotely upgrade a couple individual agents from a manager and it worked just great.  One windows 10 while a user was using the computer and they didn't notice anything.  Also a Linux system.  It worked great.

I have a couple questions however.  

1.  I noticed on the Windows systems (windows 7) that in the add/remove programs control panel there are multiple copies/version of the agent.  One is the original with the original name, wazuh-agent-3.2.0-1, but the second (upgraded one) has only the name, wazuh-agent.  Is this intended that for each remote upgrade another new instance will be installed without the version number and the original or older versioin will not be uninstalled?

2.  Is there capability to upgrade multiple agents with a single command?  Upgrading using the agent_upgrade -a <number> is okay for small numbers, but what about 1,000's?  I don't see an option in the help/menu list for multiple upgrades.  Maybe something like, agent_upgrade -a 010-200  ?  Also if there is the ability to upgrade multiple agents, what would be the maximum number to upgrade at the same time?

If there is not a way, yet, to upgrade multiple agents, would the best way to upgrade large numbers of agents be to use the company's software deployment system, just like any other piece of software and let the agent detect a previous version during the install and perform an upgrade?

Regards,
Robert

rafael...@wazuh.com

unread,
Mar 13, 2018, 10:53:52 AM3/13/18
to Wazuh mailing list
Hi Robert,

1.  Is this intended that for each remote upgrade another new instance will be installed without the version number and the original or older versioin will not be uninstalled?

This  behaviour is not intended, thank you for the feedback!. We will take control over this issue.

2. This is an interesting feature to add on our roadmap. Again thank you for the suggestion, its very helpful for us to have more use cases covered.
However you can try to update all your agents with a bash script like this:

#!/bin/bash
for (( c=1; c<=100; c++ ))
do  
   
/var/ossec/bin/agent_upgrade -a $c
done


Best regards.

Robert H

unread,
Mar 13, 2018, 5:21:30 PM3/13/18
to Wazuh mailing list
Hi Rafael,
Thanks for the update.  Glad I could contribute to the project.  

Can the above be modified to upgrade 100, 200, 400, at a time in addition to all?  We should be having 1,000's of agents so if I do an upgrade to all agent, say for 3,000 agents, it seems it might run into problems and a smaller subset may be safer to upgrade at one time.  Just something to think about in your development.

Best regards,
Robert

Victor Fernandez

unread,
Mar 21, 2018, 6:21:30 PM3/21/18
to Robert H, Wazuh mailing list
Hi Robert,

Actually, the manager doesn't deal with all the agents at the same time: there is an internal option (remoted.request_pool) that tunes the number of parallel requests. This value is 8 by default and may be incremented up to 64. So the manager won't upgrade more of 64 agents at the same time.

The upgrade tool will definitely get rid of the parallel executions better than a Bash script, but the example by Rafael should upgrade all your agents progressively.

Hope it help.
Best regards.

Victor M Fernandez-Castro 
IT Engineer — Wazuh, Inc.

--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/88877051-5d70-4604-a0fd-2aa2b70fe261%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Robert H

unread,
Mar 23, 2018, 1:23:25 PM3/23/18
to Wazuh mailing list
Thanks for the additional information Victor!

Regards,
Robert
Reply all
Reply to author
Forward
0 new messages