Skip to content

Agent gets offline on navigating to Cluster A>Cluster B>Cluster A with Elastic Defend when replace token is used. #10480

@amolnater-qasource

Description

@amolnater-qasource

Kibana version:

VERSION: 9.2.0 BC3
BUILD: 91544
COMMIT: 0c40a02e995201d9395473309adda6cd020d56ca
Artifact: https://staging.elastic.co/9.2.0-46faaca4/downloads/beats/elastic-agent/elastic-agent-9.2.0-linux-x86_64.tar.gz

Preconditions:

  1. 9.2.0-SNAPSHOT Kibana cloud environment should be available.
  2. An agent should be installed with Agent policy having Elastic Defend integration and tamper protection disabled.

Steps to reproduce:

  1. Navigate to Agents tab on Cluster A.
  2. Click Actions>Migrate Agent and add new Fleet Server URL and enrollment token for the agent policy not having Elastic Defend integration.[Cluster B]
  3. Add a Replace token say: Test123, Click Migrate Agent.
  4. Observe agent is migrated to the new cluster[Cluster B without Elastic Defend] and Agent remains Healthy.
  5. Now Migrate it to the same cluster A to the agent policy having Elastic Defend integration with same Replace Token: Test123.
  6. Observe agent gets stuck in updating state and then gets offline.

Expected behavior:
Agent should get Healthy on navigating to Cluster A>Cluster B>Cluster A with Elastic Defend when replace token is used.

What's working fine:

  • Agent ID remains same for the migrated Agents.
  • Issue is not reproduced when Replace token field is not used.

Agent Logs:

elastic-agent-diagnostics-2025-10-10T11-34-38Z-00.zip

Agent JSON:

ip-172-31-80-190-agent-details.json

Screen Capture:

Screen.Recording.2025-10-10.at.4.57.47.PM.mov
Screen.Recording.2025-10-10.at.5.01.02.PM.mov
Screen.Recording.2025-10-10.at.5.04.53.PM.mov
Image

Related Feature:
elastic/kibana#217619

Metadata

Metadata

Assignees

Labels

QA:ValidatedValidated by the QA TeamTeam:Elastic-Agent-Control-PlaneLabel for the Agent Control Plane teambugSomething isn't workingimpact:highShort-term priority; add to current release, or definitely next.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions