Skip to content
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][Detections] - rule query preview bug fix #80750

Merged
merged 6 commits into from
Oct 20, 2020

Conversation

yctercero
Copy link
Contributor

@yctercero yctercero commented Oct 15, 2020

Summary

This PR addresses the remaining query preview bugs.

  • it adds index, and request information to eql inspect - it seems that for some reason the eql search strategy response returns null for the params.body in complete responses, but not in partial responses and does not include index info. As a workaround, I set the inspect info on partial responses and manually add index info
    • added to-dos pointing this out in the code
  • updated eql sequence queries preview to use the last event timestamp of a sequence to display the hits within a histogram
  • it checks buckets length to determine noise warning for threshold rules, as opposed to total hit count
  • remove unused i18n text
  • fixes bug where threshold is being passed in for all rule types as it's always defined in the creation step, added a check to only pass through to useMatrixHistogram hook when rule type is threshold

EQL Inspect

eql_inspect

EQL Sequence

screenshot_sequence

Checklist

@yctercero yctercero added bug Fixes for quality problems that affect the customer experience release_note:fix v8.0.0 v7.10.0 v7.11.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Oct 15, 2020
@yctercero yctercero self-assigned this Oct 15, 2020
@yctercero yctercero marked this pull request as ready for review October 15, 2020 20:49
@yctercero yctercero requested review from a team as code owners October 15, 2020 20:49
@yctercero yctercero force-pushed the rule_query_preview_fix branch from 090e365 to d79bcff Compare October 16, 2020 14:00
addes some tests and a bit of cleanup
@yctercero yctercero force-pushed the rule_query_preview_fix branch from 4e9a34d to 330e631 Compare October 19, 2020 16:52
@yctercero yctercero added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:fix labels Oct 19, 2020
Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left a few comments but nothing beyond nits. Did a lot of testing on this, so it's looking pretty good 👍

@yctercero
Copy link
Contributor Author

@elasticmachine merge upstream

@yctercero
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id before after diff
securitySolution 8.1MB 8.1MB +1.6KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@yctercero yctercero merged commit d38955b into elastic:master Oct 20, 2020
yctercero added a commit to yctercero/kibana that referenced this pull request Oct 20, 2020
…#80750)

### Summary 

This PR addresses the remaining query preview bugs. 

- it adds index, and request information to eql inspect - it seems that for some reason the eql search strategy response returns `null` for the `params.body` in complete responses, but not in partial responses and does not include index info. As a workaround, I set the inspect info on partial responses and manually add index info
  - added to-dos pointing this out in the code
- updated eql sequence queries preview to use the last event timestamp of a sequence to display the hits within a histogram
- it checks buckets length to determine noise warning for threshold rules, as opposed to total hit count
- remove unused i18n text
- fixes bug where threshold is being passed in for all rule types as it's always defined in the creation step, added a check to only pass through to `useMatrixHistogram` hook when rule type is threshold
yctercero added a commit to yctercero/kibana that referenced this pull request Oct 20, 2020
…#80750)

### Summary 

This PR addresses the remaining query preview bugs. 

- it adds index, and request information to eql inspect - it seems that for some reason the eql search strategy response returns `null` for the `params.body` in complete responses, but not in partial responses and does not include index info. As a workaround, I set the inspect info on partial responses and manually add index info
  - added to-dos pointing this out in the code
- updated eql sequence queries preview to use the last event timestamp of a sequence to display the hits within a histogram
- it checks buckets length to determine noise warning for threshold rules, as opposed to total hit count
- remove unused i18n text
- fixes bug where threshold is being passed in for all rule types as it's always defined in the creation step, added a check to only pass through to `useMatrixHistogram` hook when rule type is threshold
yctercero added a commit that referenced this pull request Oct 20, 2020
…#81196)

### Summary 

This PR addresses the remaining query preview bugs. 

- it adds index, and request information to eql inspect - it seems that for some reason the eql search strategy response returns `null` for the `params.body` in complete responses, but not in partial responses and does not include index info. As a workaround, I set the inspect info on partial responses and manually add index info
  - added to-dos pointing this out in the code
- updated eql sequence queries preview to use the last event timestamp of a sequence to display the hits within a histogram
- it checks buckets length to determine noise warning for threshold rules, as opposed to total hit count
- remove unused i18n text
- fixes bug where threshold is being passed in for all rule types as it's always defined in the creation step, added a check to only pass through to `useMatrixHistogram` hook when rule type is threshold
yctercero added a commit that referenced this pull request Oct 20, 2020
…#81197)

### Summary 

This PR addresses the remaining query preview bugs. 

- it adds index, and request information to eql inspect - it seems that for some reason the eql search strategy response returns `null` for the `params.body` in complete responses, but not in partial responses and does not include index info. As a workaround, I set the inspect info on partial responses and manually add index info
  - added to-dos pointing this out in the code
- updated eql sequence queries preview to use the last event timestamp of a sequence to display the hits within a histogram
- it checks buckets length to determine noise warning for threshold rules, as opposed to total hit count
- remove unused i18n text
- fixes bug where threshold is being passed in for all rule types as it's always defined in the creation step, added a check to only pass through to `useMatrixHistogram` hook when rule type is threshold
spalger pushed a commit that referenced this pull request Oct 20, 2020
…#81197)

### Summary

This PR addresses the remaining query preview bugs.

- it adds index, and request information to eql inspect - it seems that for some reason the eql search strategy response returns `null` for the `params.body` in complete responses, but not in partial responses and does not include index info. As a workaround, I set the inspect info on partial responses and manually add index info
  - added to-dos pointing this out in the code
- updated eql sequence queries preview to use the last event timestamp of a sequence to display the hits within a histogram
- it checks buckets length to determine noise warning for threshold rules, as opposed to total hit count
- remove unused i18n text
- fixes bug where threshold is being passed in for all rule types as it's always defined in the creation step, added a check to only pass through to `useMatrixHistogram` hook when rule type is threshold

(cherry picked from commit 5e7770b)
@yctercero yctercero deleted the rule_query_preview_fix branch December 6, 2020 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.10.0 v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants