-
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.
[OBX-UX-MGMT][ALERTING] Fix Metric and Custom Threshold rules time ra…
…nge extension when the rule execution fails (#202142) ## Summary It fixes #191179 It fixes #202493 By adding guard rail to limit the time range to "no more than" 3 times the execution window. As proposed [here](#191179 (comment)) While ensuring the rule will still be able to detect the missing groups. ### What has been done: - Fix the unlimited extension of the time range when the rule fails for both rules, the Metric and Custom Threshold - Tests have been added to cover the guardrail ### Hot to test the PR: - Create Metric and Threshold rules that fire alerts with a groupBy options, e.g., with `host.name` - From the data source/generation tool, try to remove groups, and the rule should be able to detect the missing groups. - Try to make the rule fail e.g., a typo in the rules' executors. - The rule time range would be extended up to 3x during the execution and then back to the defined time range. ### Why not ignore the `lastPeriodEnd` without using a guardrail This feature is implemented for a reason, which is to catch the missing groups and keep the rule on-sync as much as possible. Also, the Security team has an appetite to introduce a similar feature. Instead of removing it completely, we keep it with a guardrail to protect the cluster resources. And we can go back to remove it or update it anytime in the future. <img width="1433" alt="Screenshot 2024-11-28 at 11 57 13" src="https://github.com/user-attachments/assets/72a04b25-c7c6-4261-8fea-9fa9a1cce3a6"> <img width="1427" alt="Screenshot 2024-11-28 at 11 57 06" src="https://github.com/user-attachments/assets/e0ee8605-fe27-4f23-bf42-4b6a9fe76e2b">
- Loading branch information
Showing
4 changed files
with
71 additions
and
16 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
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