fix: handle OpAMP AgentDisconnect message#6792
Open
michel-laterman wants to merge 2 commits intoelastic:mainfrom
Open
fix: handle OpAMP AgentDisconnect message#6792michel-laterman wants to merge 2 commits intoelastic:mainfrom
michel-laterman wants to merge 2 commits intoelastic:mainfrom
Conversation
Contributor
|
This pull request does not have a backport label. Could you fix it @michel-laterman? 🙏
|
When an enrolled agent sends an AgentDisconnect message, set its last_checkin_status to "disconnected" via the bulk checkin system. Return a BadRequest error if an unenrolled agent sends a disconnect message. Closes elastic#6784 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5829cf2 to
6b172e7
Compare
michel-laterman
commented
Apr 8, 2026
michel-laterman
added a commit
to michel-laterman/kibana
that referenced
this pull request
Apr 9, 2026
When fleet-server reports a disconnected agent via the last_checkin_status field, the agent status runtime field now emits 'offline' immediately rather than waiting for the time-based offline threshold. Related fleet-server change: elastic/fleet-server#6792 Related issue: elastic/fleet-server#6784 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ycombinator
reviewed
Apr 9, 2026
ycombinator
previously approved these changes
Apr 9, 2026
Contributor
ycombinator
left a comment
There was a problem hiding this comment.
LGTM. Thanks for filling this gap!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the problem this PR solves?
Fleet-server ignores the
AgentDisconnectfield in OpAMPAgentToServermessages, so agents that explicitly disconnect are not updated to offiline until Kibana's 5-minutelast_checkintimeout expires.How does this PR solve the problem?
When an enrolled agent sends an
AgentDisconnectmessage, fleet-server sets itslast_checkin_statustodisconnectedvia the bulk checkin system. If an unenrolled agent sends a disconnect message, aBadRequesterror is returned.Design Checklist
Checklist
./changelog/fragmentsusing the changelog toolRelated issues