You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference/fleet/migrate-elastic-agent.md
+36-18Lines changed: 36 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,7 +179,6 @@ After the restart, {{integrations-server}} will enroll a new {{agent}} for the {
179
179
::::
180
180
181
181
182
-
183
182
### Confirm your policy settings [migrate-elastic-agent-confirm-policy]
184
183
185
184
Now that the {{fleet}} settings are correctly set up, it pays to ensure that the {{agent}} policy is also correctly pointing to the correct entities.
@@ -200,7 +199,6 @@ If you modified the {{fleet-server}} and the output in place these would have be
200
199
::::
201
200
202
201
203
-
204
202
## Agent policies in the new target cluster [migrate-elastic-agent-migrated-policies]
205
203
206
204
By creating the new target cluster from a snapshot, all of your policies should have been created along with all of the agents. These agents will be offline due to the fact that the actual agents are not checking in with the new, target cluster (yet) and are still communicating with the source cluster.
@@ -210,7 +208,11 @@ The agents can now be re-enrolled into these policies and migrated over to the n
210
208
211
209
## Migrate {{agent}}s to the new target cluster [migrate-elastic-agent-migrated-agents]
212
210
213
-
In order to ensure that all required API keys are correctly created, the agents in your current cluster need to be re-enrolled into the new, target cluster.
211
+
::::{note}
212
+
Agents to be migrated cannot be tamper-protected or running as a {{fleet-server}}.
213
+
::::
214
+
215
+
In order to ensure that all required API keys are correctly created, the agents in your current cluster need to be re-enrolled into the new target cluster.
214
216
215
217
This is best performed one policy at a time. For a given policy, you need to capture the enrollment token and the URL for the agent to connect to. You can find these by running the in-product steps to add a new agent.
216
218
@@ -224,27 +226,43 @@ This is best performed one policy at a time. For a given policy, you need to cap
224
226
:screenshot:
225
227
:::
226
228
227
-
5. On the host machines where the current agents are installed, enroll the agents again using this copied URL and the enrollment token:
229
+
5. Choose an approach:
228
230
229
-
```shell
230
-
sudo elastic-agent enroll --url=<fleet server url> --enrollment-token=<token for the new policy>
231
-
```
231
+
::::{tab-set}
232
+
:::{tab-item} Fleet UI
232
233
233
-
The command output should be like the following:
234
+
{applies_to}`stack: ga 9.2` Migrate remote agents directly from the {{fleet}} UI:
1. In the source cluster, select the agents you want to migrate. Click the three dots next to the agents, and select **Migrate agents**.
237
+
2. In the migration dialog, provide the URI and enrollment token you obtained from the target cluster.
238
+
3. Use `replace_token` (Optional): When you are migrating a single agent, you can use the `replace_token` field to preserve the agent's original ID from the source cluster. This step helps with event matching, but will cause the migration to fail if the target cluster already has an agent with the same ID.
238
239
:::
239
240
240
-
6. The agent on each host will now check into the new {{fleet-server}} and appear in the new target cluster. In the source cluster, the agents will go offline as they won’t be sending any check-ins.
1. On the host machines where the current agents are installed, enroll the agents again using the URL and enrollment token you obtained from the target cluster:
246
+
247
+
```shell
248
+
sudo elastic-agent enroll --url=<fleet server url> --enrollment-token=<token for the new policy>
2. The agent on each host will now check into the new {{fleet-server}} and appear in the new target cluster. In the source cluster, the agents will go offline as they won’t be sending any check-ins.
246
259
247
-
7. Repeat this procedure for each {{agent}} policy.
0 commit comments