-
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
[Security Solution][Alerts] Alert suppression time window #148868
Merged
marshallmain
merged 31 commits into
elastic:main
from
marshallmain:alert-suppression-time-window
Jan 30, 2023
Merged
Changes from 25 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
d48454d
WIP
marshallmain 51776bc
Merge branch 'main' of github.com:elastic/kibana into alert-suppressi…
marshallmain 382f0c3
Add radio button to rule create, implement alert update logic
marshallmain bf6ec62
Add explicit index to bulk updates
marshallmain b210b3b
Fix deduplication bug with null values, add tests
marshallmain 5d52a88
Cleanup
marshallmain 6743a5d
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine 899d160
Fix types
marshallmain 3a6d854
Merge branch 'main' into alert-suppression-time-window
marshallmain f39021f
Fix more types
marshallmain 7d7b504
Fix unit tests
marshallmain 60b8490
Fix test data
marshallmain bea5a14
Merge branch 'main' into alert-suppression-time-window
marshallmain 14037fd
Add real rule execution test for suppression
marshallmain 57cb8cf
Merge branch 'main' into alert-suppression-time-window
marshallmain b2d2df2
Merge branch 'main' into alert-suppression-time-window
marshallmain feb371f
Move suppression types to rule registry
marshallmain 79e81a9
Apply Garrett's fix
marshallmain d2c586b
Add timestamp override and max_signals tests, move schema
marshallmain d654699
Merge branch 'main' of github.com:elastic/kibana into alert-suppressi…
marshallmain 0c0b157
Fix import
marshallmain ce3a624
Fix technical field names post merge
marshallmain 424d74b
Merge branch 'main' into alert-suppression-time-window
marshallmain 6e6c572
Helper funcs in persistence wrapper, fix license check in UI
marshallmain 969253f
Exclude closed alerts from suppression update logic
marshallmain 9b98237
PR comments
marshallmain 6052cc9
Merge branch 'main' of github.com:elastic/kibana into alert-suppressi…
marshallmain 3f1ecb2
Update x-pack/plugins/rule_registry/server/utils/create_persistence_r…
marshallmain 487f56b
Modify tests to account for alert start and enable rule timestamp bug
marshallmain 5650d6f
Fix tests
marshallmain 1ca4f87
Merge branch 'main' into alert-suppression-time-window
marshallmain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
x-pack/plugins/rule_registry/common/schemas/8.6.0/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { | ||
ALERT_SUPPRESSION_TERMS, | ||
ALERT_SUPPRESSION_START, | ||
ALERT_SUPPRESSION_END, | ||
ALERT_SUPPRESSION_DOCS_COUNT, | ||
} from '@kbn/rule-data-utils'; | ||
import { AlertWithCommonFields800 } from '../8.0.0'; | ||
|
||
/* DO NOT MODIFY THIS SCHEMA TO ADD NEW FIELDS. These types represent the alerts that shipped in 8.0.0. | ||
Any changes to these types should be bug fixes so the types more accurately represent the alerts from 8.0.0. | ||
|
||
If you are adding new fields for a new release of Kibana, create a new sibling folder to this one | ||
for the version to be released and add the field(s) to the schema in that folder. | ||
|
||
Then, update `../index.ts` to import from the new folder that has the latest schemas, add the | ||
new schemas to the union of all alert schemas, and re-export the new schemas as the `*Latest` schemas. | ||
*/ | ||
|
||
export interface SuppressionFields860 { | ||
[ALERT_SUPPRESSION_TERMS]: Array<{ field: string; value: string | number | null }>; | ||
[ALERT_SUPPRESSION_START]: Date; | ||
[ALERT_SUPPRESSION_END]: Date; | ||
[ALERT_SUPPRESSION_DOCS_COUNT]: number; | ||
} | ||
|
||
export type AlertWithSuppressionFields860<T> = AlertWithCommonFields800<T> & SuppressionFields860; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Can we move this field to the
default_alerts_as_data.ts
file to make it available for all alerts and have it renamed tolast_detected
for consistency withstart
andend
?