-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Security Solution][Endpoint] Cleanup and improvements to run_endpoint_agent.js
CLI tool
#155730
[Security Solution][Endpoint] Cleanup and improvements to run_endpoint_agent.js
CLI tool
#155730
Conversation
…mon fleet service function
… calls to new common services
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
To update your PR or re-run it, just comment with: |
super('agent_download_storage_settings.json', { | ||
defaultSettings: { | ||
maxFileAge: 1.728e8, // 2 days | ||
lastCleanup: new Date().toISOString(), |
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.
How this works? Each time we run the script this is gonna take the current Date, so last cleanup will be always now right? Am I missing something?
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.
Yes and no.
This is the default value for the configuration for this tool. If you look at super.ensureExists()
you will see that it uses this only if the settings file does not yet exist.
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.
Got it, thanks for the explanation!
Summary
As a follow up to PR #155455 :
run_endpoint_agent
CLI: Removed internal code that handles the creation of a VM and the enrollment of the agent with fleet and replaced it with use of methods now found inendpoint_host_services
run_endpoint_agent
to use cached version of agent download, and thus increase the performance of this tool