Skip to content

[7.x] [Security Solution][Detections] Handle dupes when processing threshold rules (#83062)#84466

Merged
madirey merged 1 commit intoelastic:7.xfrom
madirey:backport/7.x/pr-83062
Nov 30, 2020
Merged

[7.x] [Security Solution][Detections] Handle dupes when processing threshold rules (#83062)#84466
madirey merged 1 commit intoelastic:7.xfrom
madirey:backport/7.x/pr-83062

Conversation

@madirey
Copy link
Copy Markdown
Contributor

@madirey madirey commented Nov 30, 2020

Backports the following commits to 7.x:

…d rules (elastic#83062)

* Fix threshold rule synthetic signal generation

* Use top_hits aggregation

* Find signals and aggregate over search terms

* Exclude dupes

* Fixes to algorithm

* Sync timestamps with events/signals

* Add timestampOverride

* Revert changes in signal creation

* Simplify query, return 10k buckets

* Account for when threshold.field is not supplied

* Ensure we're getting the last event when threshold.field is not provided

* Add missing import

* Handle case where threshold field not supplied

* Fix type errors

* Handle non-ECS fields

* Regorganize

* Address comments

* Fix type error

* Add unit test for buildBulkBody on threshold results

* Add threshold_count back to mapping (and deprecate)

* Timestamp fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@madirey madirey added the backport This PR is a backport of another PR label Nov 30, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Distributable file count

id before after diff
default 43467 43468 +1

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

@madirey madirey merged commit 5d4162b into elastic:7.x Nov 30, 2020
@madirey madirey deleted the backport/7.x/pr-83062 branch November 30, 2020 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants