Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Introduce geo-threshold alerts #76285
Introduce geo-threshold alerts #76285
Changes from all commits
d9feaf8
5e04cb5
7b1e63a
7fd2e12
3aee55d
6498731
b240f26
15df0e8
150f386
a8361ae
03d16b4
ca57405
ae7f61e
a092358
c0bf66d
7df4d2e
a1733a1
13d82da
0b38bdb
01f6964
cb93339
76dc00a
c173ee9
77f1e3e
944a4f8
078d781
16400eb
97bec60
1f46fd6
61e705c
a167988
8943656
1f95cef
093be29
fafc8b6
51da2b1
aba7e31
6443b61
1dfbcce
d4cfe77
4374310
44d756e
d2ae160
58d9cbd
83781f2
a50ecb9
ba16694
83f0c6d
afed143
6ebd455
db523c2
130e617
036a46b
2f77334
68e9414
79971f8
76e699a
49652bd
e1af8a3
beca47b
e4e6fa9
e139fd4
f0491bd
50e0926
da52a2c
45eee57
5add92c
997e0f2
fc8090b
a91c3ac
87116fa
8f346d3
604d107
035714b
84513c8
05cac9e
c5a9323
30aad87
832ddd4
e2a305f
b9d75bd
523de58
a84b78f
bc5d4d1
ecbac9e
e3c053d
8dbc8a4
d2ca92c
1acdf69
9e08608
64dd8d5
19ff93f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
worth noting that I believe the
previousStartedAt
will get reset tonull
when an alert isdisabled()
and thenenabled()
again - @mikecote that's still right? Actually, I'm thinking of the alert state itself, but guessing this is implicitly part of the alert state.For the index threshold alert, we require the user to explicitly pass a
window
of time to use, to calculate the dates used to get the range of values to test.There's some code here from the security solution that also uses
previousStartedAt
that you might want to look over:kibana/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts
Lines 43 to 50 in 4bf0932
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.
Agreed there's room for improvement here. Not sure if should be part of this PR or a future optimization. Will discuss!
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.
Add size param here:
fwiw: It's tough to determine this up-front. This is because it is a nested agg, and the number of shapes-filters determines the amount of buckets you have available in the sub-terms agg. The top-hits also adds a bucket.
So I would try something like
MAX_BUCKET_NUMBER/(shapesFilters.length * 2)
(* 2 because the top-hots creates a bucket for each term as well).
^ fwiw this is completely off the cuff and we should doulbe check with ES-team to know how to determine the agg-limits more exactly.
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.
FYI, this was the issue preventing triggered alerts from picking up the latest point from
other
. The reason it usually worked fine within shapes was that there was usually <= 10 unique entities in any given shape. Obviously inother
there were far more.