-
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
Updates to pre-built Security ML jobs #146760
Updates to pre-built Security ML jobs #146760
Conversation
Pinging @elastic/ml-ui (:ml) |
@machadoum Any thoughts on backporting? Or do we want to skip? |
Please keep on main - changes are too significant for backporting, as FF has passed. |
@sophiec20 Yeah we didn't intend for this to go in in 8.6. Fair point about keeping it on main owing to the magnitude of changes made. |
The display names part of the change looks fine to me. There's one change in this PR that's not mentioned in the PR description. Two This rename will have side effects in other areas. The ML QA tests will need to be changed to reference the new IDs and I guess those IDs might need updating somewhere in the Security app too? This isn't necessarily a problem, but needs to be clearly flagged up as a side effect that others will have to deal with.
That part is a bug fix, so could be backported to 8.6. (Just that one line change.) |
.../server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_process.json
Outdated
Show resolved
Hide resolved
...l/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json
Show resolved
Hide resolved
.../server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_service.json
Show resolved
Hide resolved
@ajosh0504 if you keep the changes to the module IDs in this PR, you'll need to adjust some of the API tests in |
I searched for the IDs inside the security repo, and this is the only reference that I could find: kibana/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_modules.tsx Lines 14 to 15 in f85c39e
@ajosh0504 Could you please update it? |
@droberts195 Thanks for catching that. I've updated the PR title, as well as the description to indicate that multiple changes are being made to the pre-built ML jobs in this PR. I've also called out that updates will need to be made in a few other places and I'll try to update as many tests as possible in this PR per recommendations from @peteharverson and @machadoum. |
…-ref HEAD~1..HEAD --fix'
@peteharverson I updated the test files you mentioned above. While updating those, I realized that there's some other siem references in the tests owing to the folders here being named as siem_*. Is this sometime we want to modify in this PR as well? Another thing I noted was references to moduleIDs containing versions (for example here), but those module IDs don't really exist here? |
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.
Codeowners review from Detection-Rules LGTM
@rylnd Could you double check if the renaming of the modules:
has any impact on your side? We have them hardcoded on @ajosh0504 Can we wait until getting confirmation on this before merging? |
x-pack/plugins/security_solution/public/common/components/ml_popover/ml_modules.tsx
Outdated
Show resolved
Hide resolved
@jpdjere thanks for the ping; I'm not certain on what the exact behavior is going to be here currently, but I can share some context/thoughts:
|
Hi @ajosh0504,
The esArchives have been named close to the module ids to make it easier for developers to recognize / find them, so it would make sense to rename the archives as part of this PR. Note, that this should also include updating the index name used by the data archive. Let me know if you need help with this or prefer to have this in a separate PR.
Please note, that the directory names listed here are not necessarily the module ids. The actual module ids are defined in the manifest files, se e.g. here. |
I've requested @pheyos to help with the esArchive naming update. @rylnd I've added the new module names to the |
@ajosh0504 the esArchive rename (including renaming of the contained indices) is done in 5e60cec. |
@pheyos Seeing some failing tests after your commit, although looking at the logs, I'm not sure if the failures are related to your changes. Could you take a look? |
@ajosh0504 yes, the failures seem unrelated to the archive rename. Might be worth to comment |
@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.
.../ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_city.json
Outdated
Show resolved
Hide resolved
.../server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_country.json
Outdated
Show resolved
Hide resolved
...r/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_process_all_hosts.json
Outdated
Show resolved
Hide resolved
...l/server/models/data_recognizer/modules/security_linux/ml/v3_rare_process_by_host_linux.json
Outdated
Show resolved
Hide resolved
...er/models/data_recognizer/modules/security_network/ml/high_count_by_destination_country.json
Outdated
Show resolved
Hide resolved
...dels/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_all_hosts.json
Outdated
Show resolved
Hide resolved
@ryland I ran some tests locally to check the impact on existing ML jobs. Steps
This means that updating the module id and removing other |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
@ajosh0504 @rylnd -- just now seeing this PR, and was also curious about the upgrade flow and UI functionality within the Security app with this module name change so I did a little testing as well. Similar to @ajosh0504's test above, I checked out the commit before this landed 578d643 where the module was still named I was then curious if there would be any hiccups in the Security UI if needing to re-install any of the jobs, so I went to the ML UI, deleted one job ( So as you suspected @rylnd, since everything on the Security side is using Also, I went went ahead and created this enhancement for surfacing the new |
@spong Thank you so much for the additional tests you ran. Glad that my changes don't break things at y'all's end. :) Also, yay enhancements! |
Summary
This PR makes the following updates to our pre-built Security ML jobs:
security
job group which is required to display jobs in the Security App. Added that as well.siem_cloudtrail
->security_cloudtrail
andsiem_packetbeat
->security_packetbeat
. This should have happened a while ago per this issue.Side effects
siem_cloudtrail
andsiem_packetbeat
modules will need to be changed to reference the new modules instead