-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet] Create task that periodically unenrolls inactive agents #189861
[Fleet] Create task that periodically unenrolls inactive agents #189861
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
The PR is not 100% complete but I'm opening it for early review to get some feedback on the approach I used. The agent policy query fetches max 500 policies and the agents query max 1000 to avoid scale issues; for this reason the task runs every 10 min. If there are no policies with |
Pinging @elastic/fleet (Team:Fleet) |
...c/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/fleet/server/tasks/unenroll_inactive_agents_task.ts
Outdated
Show resolved
Hide resolved
@kpollich I'll see if it's possible to distinguish those actions from the ones performed from the user. I don't know if there's a way to mark the actions differently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we should probably create an ingest-docs request to document this feature, stating that the inactive agents are going to be unenrolled at a rate of 1k/10m.
Thanks Cristina that UI change looks great! |
...lications/fleet/sections/agents/agent_list_page/components/agent_activity_flyout/helpers.tsx
Outdated
Show resolved
Hide resolved
...lications/fleet/sections/agents/agent_list_page/components/agent_activity_flyout/helpers.tsx
Show resolved
Hide resolved
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResponseOps changes LGTM
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @criamico |
Closes #179399
Summary
Create a new periodic task that unenrolls inactive agents based on
unenroll_timeout
set on agent policiesIn the agent policy settings there is now a new section:
Testing
unenroll_timeout
set to any valueNote that the executed unenroll action is also visible in the UI:
unenroll_timeout
set or there are no inactive agents on those policies, you should see logs like these:Checklist