Run a mass Agent Client Collector upgrade using a background script

  • Release version: Australia
  • Updated May 28, 2026
  • 1 minute to read
  • 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

    1. Navigate to All > System Definition > Scripts - Background.
    2. Change the application scope to sn_agent (Agent Client Collector).
    3. 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 Services

      Set duration to the number of minutes used for rate limiting calculations. The default value of 60 applies the per-hour limits configured in the upgrade properties.

    4. Select Run script.
      The system begins upgrading eligible agents immediately, adhering to the rate limits set in the upgrade properties.