mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Fleet] Update query in delete unenrolled agents task (#224808)
## Summary Issue reported by users that some unenrolled agents on the UI are not being deleted by the background task. The cause turned out to be a discrepancy in how unenrolled agents are determined on the UI versus the background task. The UI shows agents as unenrolled if `active:false` field matches (logic [here](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/server/services/agents/build_status_runtime_field.ts#L115-L119)) The delete unenrolled agents task also queried on the existence of `unenrolled_at` field. It seems some agents don't have this field set, those should be deleted too.
This commit is contained in:
parent
0176ea941b
commit
c989634a81
1 changed files with 0 additions and 1 deletions
|
@ -116,7 +116,6 @@ export class DeleteUnenrolledAgentsTask {
|
|||
active: false,
|
||||
},
|
||||
},
|
||||
{ exists: { field: 'unenrolled_at' } },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue