Upgrade Fleet-managed Elastic Agents

edit

Want to upgrade a standalone agent instead? See Upgrade standalone Elastic Agents.

With Fleet upgrade capabilities, you can view and select agents that are out of date, and trigger selected agents to download, install, and run the new version. You can trigger upgrades to happen immediately, or specify a maintenance window during which the upgrades will occur. If your Elastic Stack subscription level supports it, you can schedule upgrades to occur at a specific date and time.

In most failure cases the Elastic Agent may retry an upgrade after a short wait. The wait durations between retries are: 1m, 5m, 10m, 15m, 30m, and 1h. During this time, the Elastic Agent may show up as "retrying" in the Fleet UI. As well, if agent upgrades have been detected to have stalled, you can restart the upgrade process for a single agent or in bulk for multiple agents.

This approach simplifies the process of keeping your agents up to date. It also saves you time because you don’t need third-party tools or processes to manage upgrades.

By default, Elastic Agents require internet access to perform binary upgrades from Fleet. However, you can host your own artifacts repository and configure Elastic Agents to download binaries from it. For more information, refer to Air-gapped environments.

The upgrade feature is not supported for upgrading DEB/RPM packages or Docker images.

To upgrade your Elastic Agents, go to Management > Fleet > Agents in Kibana. You can perform the following upgrade-related actions:

User action Result

Upgrade a single Elastic Agent

Upgrade a single agent to a specific version.

Do a rolling upgrade of multiple Elastic Agents

Do a rolling upgrade of multiple agents over a specific time period.

Schedule an upgrade

Schedule an upgrade of one or more agents to begin at a specific time.

View upgrade status

View the status of an upgrade, including upgrade metrics and agent logs.

Restart an upgrade for a single agent

Restart an upgrade process that has stalled for a single agent.

Restart an upgrade for multiple agents

Do a bulk restart of the upgrade process for a set of agents.

Upgrade a single Elastic Agent
edit
  1. On the Agents tab, click Upgrade available to see a list of agents that you can upgrade.
  2. From the Actions menu next to the agent, choose Upgrade agent.

    Menu for upgrading a single Elastic Agent

    The Upgrade agent option is grayed out if an upgrade is unavailable or the Kibana version is lower than the agent version.

  3. In the Upgrade agent window, select an upgrade version and click Upgrade agent.
Do a rolling upgrade of multiple Elastic Agents
edit

You can do rolling upgrades to avoid exhausting network resources when updating a large number of Elastic Agents.

  1. On the Agents tab, select multiple agents, and click Actions.
  2. From the Actions menu, choose to upgrade the agents.
  3. In the Upgrade agents window, select an upgrade version.
  4. Select the amount of time available for the maintenance window. The upgrades are spread out uniformly across this maintenance window to avoid exhausting network resources.

    To force selected agents to upgrade immediately when the upgrade is triggered, select Immediately. Avoid using this setting for batches of more than 10 agents.

  5. Upgrade the agents.
Schedule an upgrade
edit
  1. On the Agents tab, select one or more agents, and click Actions.
  2. From the Actions menu, choose to schedule an upgrade.

    Menu for scheduling Elastic Agent upgrades

    If the schedule option is grayed out, it may not be available at your subscription level. For more information, refer to Elastic Stack subscriptions.

  3. In the Upgrade window, select an upgrade version.
  4. Select a maintenance window. For more information, refer to Do a rolling upgrade of multiple Elastic Agents.
  5. Set the date and time when you want the upgrade to begin.
  6. Click Schedule.
View upgrade status
edit
  1. On the Agents tab, when you trigger an upgrade, agents that are upgrading have the status Updating until the upgrade is complete, then the status changes back to Healthy.

    Screenshot of Agents tab showing upgrade status
  2. When upgrading many agents, you can fine tune the maintenance window by viewing stats and metrics about the upgrade:

    1. On the Agents tab, click the host name to view agent details. If you don’t see the host name, try refreshing the page.
    2. Click View agent dashboard to open the [Elastic Agent] metrics dashboard.
  3. If the upgrade fails, view the agent logs to find the reason:

    1. In Fleet, in the Host column, click the agent’s name.
    2. Open the Logs tab.
    3. Search for failures.

      Agent logs showing upgrade failure
Restart an upgrade for a single agent
edit

An Elastic Agent upgrade process may sometimes stall. This can happen for various reasons, including, for example, network connectivity issues or a delayed shutdown.

When an Elastic Agent upgrade has been detected to be stuck, a warning indicator appears on the UI. When this occurs, you can restart the upgrade from either the Agents tab on the main Fleet page or from the details page for any individual agent.

Restart from main Fleet page:

  1. From the Actions menu next to an agent that is stuck in an Updating state, choose Restart upgrade.
  2. In the Restart upgrade window, select an upgrade version and click Upgrade agent.

Restart from an agent details page:

  1. In Fleet, in the Host column, click the agent’s name. On the Agent details tab, a warning notice appears if the agent is detected to have stalled during an upgrade.
  2. Click Restart upgrade.
  3. In the Restart upgrade window, select an upgrade version and click Upgrade agent.
Restart an upgrade for multiple agents
edit

When the upgrade process for multiple agents has been detected to have stalled, you can restart the upgrade process in bulk.

  1. On the Agents tab, select any set of the agents that are indicated to be stuck, and click Actions.
  2. From the Actions menu, select Restart upgrade <number> agents.
  3. In the Restart upgrade…​ window, select an upgrade version.
  4. Select the amount of time available for the maintenance window. The upgrades are spread out uniformly across this maintenance window to avoid exhausting network resources.

    To force selected agents to upgrade immediately when the upgrade is triggered, select Immediately. Avoid using this setting for batches of more than 10 agents.

  5. Restart the upgrades.