Run a mass Agent Client Collector upgrade using a background script
Trigger an immediate upgrade of all eligible Agent Client Collector agents without waiting for the next scheduled job run.
Before you begin
Configure the required upgrade properties before running the script. For details, see Agent Client Collector upgrade properties.
Role required: agent_client_collector_admin
About this task
The background script upgrades agents connected via MID Server and agents connected via Cloud Services (ICS) in a single run. Both function calls in the script are required — omitting either skips the corresponding agent group.
The system queries all agents that are Up, not duplicated, have a valid MID Server or Pod connection, and have not exceeded the retry limit. Agents with no prior failures are upgraded before agents with prior failures.
Procedure
Navigate to All > System Definition > Scripts - Background.
Change the application scope to
sn_agent(Agent Client Collector).Paste the following script into the editor.
var duration = 60; // Duration in minutes for rate limiting calculations var a = new AgentUpgradeUtil(); a.upgradeAgentsLimitedByMid(duration); // Upgrades agents connected via MID Servers a.upgradeAgentsMidless(duration); // Upgrades agents connected via Cloud ServicesSet
durationto the number of minutes used for rate limiting calculations. The default value of60applies the per-hour limits configured in the upgrade properties.Select Run script.
The system begins upgrading eligible agents immediately, adhering to the rate limits set in the upgrade properties.
Parent Topic:Agent Client Collector upgrade overview