-
Notifications
You must be signed in to change notification settings - Fork 527
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
Refactor experimental ML CLI and code #1218
Refactor experimental ML CLI and code #1218
Conversation
# Conflicts: # detection_rules/devtools.py
Will need to discuss backporting. This will break compatibility with existing releases. More to follow |
You can also upload files locally using the `-d` option, so long as the naming convention of the files match the | ||
expected pattern for the filenames. | ||
|
||
#### 2. |
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.
Is there more to come here?
|
||
### Uploading rules | ||
|
||
You can then individually upload these rules using the [kibana upload-rule](../CLI.md#uploading-rules-to-kibana) command |
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.
The link to kibana upload-rule
does not seem to be working.
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.
You can then individually upload these rules using the [kibana upload-rule](../CLI.md#uploading-rules-to-kibana) command | |
You can then individually upload these rules using the [kibana upload-rule](../../CLI.md#uploading-rules-to-kibana) command |
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.
Updated.
|
||
#### 2. Update packetbeat configuration | ||
|
||
You will need to update your packebeat.yml config file to point to the enrichment pipeline |
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.
What if I'm using Fleet?
You will need to update your packebeat.yml config file to point to the enrichment pipeline | |
You will need to update your packetbeat.yml config file to point to the enrichment pipeline |
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.
Updated.
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.
if fleet, then you should be able to just configure the ingest pipeline in the elasticsearch index config, IINM
You can also upload files locally using the `-d` option, so long as the naming convention of the files match the | ||
expected pattern for the filenames. | ||
|
||
#### 2. |
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.
🍿
detection_rules/ml.py
Outdated
|
||
@classmethod | ||
def from_release(cls, es_client: Elasticsearch, release_tag: str, repo: str = 'elastic/detection-rules' | ||
) -> 'MachineLearningClient': |
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.
this floating )
... 😭
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.
I stared at this line for several minutes deciding if I wanted to break at str
, or here - not a fan of either
|
||
def remove(self) -> dict: | ||
"""Remove machine learning files from a stack.""" | ||
results = dict(script={}, pipeline={}, model={}) |
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.
think a named tuple or data class would make more sense?
Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com>
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, pending the TODOs.
thanks for the changes @brokensound77 and @ajosh0504
* move github and ml to their own files * refactor release and ml commands * update ML readmes * add unzip_to_dict function * prompt for model ID in remove-model * update experimental rule upload process * update remove-scripts-pipelines to take multiple options Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com> Co-authored-by: Apoorva <appujo@gmail.com> (cherry picked from commit 0ec8d67)
Issues
related to https://github.com/elastic/security-team/issues/1204
Summary