Skip to content

Commit 2e4afed

Browse files
[8.19] Add documentation for the Fleet auto-upgrade feature (#1832)
* [8.19] Add documentation for the Fleet auto-upgrade feature * Update docs/en/ingest-management/agent-policies.asciidoc Co-authored-by: Colleen McGinnis <[email protected]> --------- Co-authored-by: Colleen McGinnis <[email protected]>
1 parent cda855c commit 2e4afed

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed

docs/en/ingest-management/agent-policies.asciidoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ The following table illustrates the {fleet} user actions available to different
100100
|{y}
101101
|{n}
102102

103+
|<<agent-policy-automatic-agent-upgrade,Configure an automatic {agent} upgrade>>
104+
|{y}
105+
|{n}
106+
103107
|<<change-policy-output,Change the output of a policy>>
104108
|{y}
105109
|{n}
@@ -367,6 +371,14 @@ You can set a rate limit for the action handler for diagnostics requests coming
367371

368372
This setting configures retries for the file upload client handling diagnostics requests coming from {fleet}. The setting affects only {fleet}-managed {agents}. By default, a maximum of `10` retries are allowed with an initial duration of `1s` and a backoff duration of `1m`. The client may retry failed requests with exponential backoff.
369373

374+
[discrete]
375+
[[agent-policy-automatic-agent-upgrade]]
376+
== Configure an automatic {agent} upgrade
377+
378+
For a high-scale deployment of {fleet}, you can configure an automatic, gradual rollout of a new minor or patch version to a percentage of the {agents} in your policy. For more information, refer to <<auto-upgrade-agents,Auto-upgrade agents enrolled in a policy>>.
379+
380+
NOTE: This feature is only available for certain subscription levels. For more information, refer to {subscriptions}[{stack} subscriptions].
381+
370382
[discrete]
371383
[[change-policy-output]]
372384
== Change the output of a policy

docs/en/ingest-management/fleet/upgrade-elastic-agent.asciidoc

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ These restrictions apply whether you are upgrading {agents} individually or in b
5151
[[upgrade-agent]]
5252
== Upgrading {agent}
5353

54-
To upgrade your {agent}s, go to *Management > {fleet} > Agents* in {kib}. You
54+
To upgrade your {agents}, go to *Management* → *{fleet}* → *Agents* in {kib}. You
5555
can perform the following upgrade-related actions:
5656

5757
[options,header]
@@ -78,6 +78,8 @@ can perform the following upgrade-related actions:
7878

7979
|===
8080

81+
With the right {subscriptions}[subscription level], you can also configure an automatic, gradual upgrade of a percentage of the {agents} enrolled in an {agent} policy. For more information, refer to <<auto-upgrade-agents,Auto-upgrade agents enrolled in a policy>>.
82+
8183
[discrete]
8284
[[upgrade-an-agent]]
8385
== Upgrade a single {agent}
@@ -263,6 +265,69 @@ triggered, select **Immediately**. Avoid using this setting for batches of more
263265
than 10 agents.
264266
. Restart the upgrades.
265267

268+
[discrete]
269+
[[auto-upgrade-agents]]
270+
== Auto-upgrade agents enrolled in a policy
271+
272+
NOTE: This feature is only available for certain subscription levels. For more information, refer to {subscriptions}[{stack} subscriptions].
273+
274+
To configure an automatic rollout of a new minor or patch version to a percentage of the agents enrolled in your {agent} policy. follow these steps:
275+
276+
. In {kib}, go to **Management** → **{fleet}** → **Agent policies**.
277+
. Select the agent policy for which you want to configure an automatic agent upgrade.
278+
. On the agent policy's details page, find **Auto-upgrade agents**, and select **Manage** next to it.
279+
. In the **Manage auto-upgrade agents** window, click **Add target version**.
280+
. From the **Target agent version** dropdown, select the minor or patch version to which you want to upgrade a percentage of your agents.
281+
. In the **% of agents to upgrade** field, enter the percentage of active agents you want to upgrade to this target version.
282+
+
283+
Note that:
284+
+
285+
* Unenrolling, unenrolled, inactive, and uninstalled agents are not included in the count. For example, if you set the target upgrade percentage to 50% for a policy with 10 active agents and 10 inactive agents, the target is met when 5 active agents are upgraded.
286+
* Rounding is applied, and the actual percentage of the upgraded agents may vary slightly. For example, if you set the target upgrade percentage to 30% for a policy with 25 active agents, the target is met when 8 active agents are upgraded (32%).
287+
288+
. You can then add a different target version, and specify the percentage of agents you want to be upgraded to that version. The total percentage of agents to be upgraded cannot exceed 100%.
289+
. Click **Save**.
290+
291+
Once the configuration is saved, an asynchronous task runs every 30 minutes, gradually upgrading the agents in the policy to the specified target version.
292+
293+
In case of any failed upgrades, the upgrades are retried with exponential backoff mechanism until the upgrade is successful, or the maximum number of retries is reached. Note that the maximum number of retries is the number of <<auto-upgrade-settings,configured retry delays>>.
294+
295+
[NOTE]
296+
====
297+
Only active agents enrolled in the policy are considered for the automatic upgrade.
298+
299+
If new agents are assigned to the policy, the number of {agents} to be upgraded is adjusted according to the set percentages.
300+
====
301+
302+
[discrete]
303+
[[auto-upgrade-settings]]
304+
=== Configure the auto-upgrade settings
305+
306+
On self-managed and cloud deployments of {stack}, you can configure the default task interval and the retry delays of the automatic upgrade in the {kibana-ref}/fleet-settings-kb.html[{kib} {fleet} settings]. For example:
307+
308+
[source,yml]
309+
------------
310+
xpack.fleet.autoUpgrades.taskInterval: 15m <1>
311+
xpack.fleet.autoUpgrades.retryDelays: ['5m', '10m', '20m'] <2>
312+
------------
313+
<1> The time interval at which the auto-upgrade task should run. Defaults to `30m`.
314+
<2> Array indicating how much time should pass before a failed auto-upgrade is retried. The array's length indicates the maximum number of retries. Defaults to `['30m', '1h', '2h', '4h', '8h', '16h', '24h']`.
315+
316+
For more information, refer to {kibana-ref}/settings.html[Configure {kib}].
317+
318+
[discrete]
319+
[[auto-upgrade-view-status]]
320+
=== View the status of the automatic upgrade
321+
322+
You can view the status of the automatic upgrade in the following ways:
323+
324+
* On the agent policy's details page, find **Auto-upgrade agents**, and select **Manage** to open the **Manage auto-upgrade agents** window.
325+
+
326+
The status of the upgrade is displayed next to the specified target version and percentage, and includes the percentage of agents that have already been upgraded.
327+
+
328+
To view any failed upgrades, hover over the **Upgrade failed** status, then click **Go to upgrade**.
329+
* On the **{fleet}** → **Agents** page, click **Agent activity** to open a flyout showing logs of the {agent} activity and the progress of the automatic agent upgrade.
330+
266331
[discrete]
267332
[[upgrade-system-packages]]
268333
== Upgrade RPM and DEB system packages

0 commit comments

Comments
 (0)