elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.39k stars 8k forks source link

[UII] Request diagnostics action has incorrect expiration #183692

Closed jen-huang closed 1 week ago

jen-huang commented 2 weeks ago

I stumbled on REQUEST_DIAGNOSTICS_TIMEOUT_MS which seems it was intended to be 3 hours, but actually the calculation is missing another * 60, so the diagnostics file action expiration is only 3 minutes at the moment:

https://github.com/elastic/kibana/blob/12874e4deca193d91f7a17c19a35c4f25168dcd1/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts#L23

Fix the calculation and double check that we are setting an expiration everywhere we create REQUEST_DIAGNOSTICS actions. This file seems to create some but does not pass in an expiration so it defaults to 1 month: https://github.com/elastic/kibana/blob/12874e4deca193d91f7a17c19a35c4f25168dcd1/x-pack/plugins/fleet/server/services/agents/request_diagnostics_action_runner.ts#L62

elasticmachine commented 2 weeks ago

Pinging @elastic/fleet (Team:Fleet)