-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Response Ops][Alerting] Adding ability to run actions for backfill r…
…ule runs (#200784) Resolves elastic/response-ops-team#251 ## Note This PR includes some saved object schema changes that I will pull out into their own separate PR in order to perform an intermediate release. I wanted to make sure all the schema changes made sense in the overall context of the PR before opening those separate PRs. Update: PR for intermediate release here: #203184 (Merged) ## Summary Adds ability to run actions for backfill rule runs. - Updates schedule backfill API to accept `run_actions` parameter to specify whether to run actions for backfill. - Schedule API accepts any action where `frequency.notifyWhen === 'onActiveAlert'`. If a rule has multiple actions where some are `onActiveAlert` and some are `onThrottleInterval`, the invalid actions will be stripped and a warning returned in the schedule response but valid actions will be scheduled. - Connector IDs are extracted and stored as references in the ad hoc run params saved object - Any actions that result from a backfill task run are scheduled as low priority tasks ## To Verify 1. Create a detection rule. Make sure you have some past data that the rule can run over in order to generate actions. Make sure you add actions to the rule. For testing, I added some conditional actions so I could see actions running only on backfill runs using `kibana.alert.rule.execution.type: "manual"`. Create actions with and without summaries. 2. Schedule a backfill either directly via the API or using the detection UI. Verify that actions are run for the backfill runs that generate alerts. --------- Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
a39898b
commit 075806b
Showing
50 changed files
with
4,251 additions
and
421 deletions.
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
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.