Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.8] [RAM][Maintenance Window][8.8]Fix window maintenance workflow (#…
…156427) (#156770) # Backport This will backport the following commits from `main` to `8.8`: - [[RAM][Maintenance Window][8.8]Fix window maintenance workflow (#156427)](#156427) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jiawei Wu","email":"74562234+JiaweiWu@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-05T00:11:26Z","message":"[RAM][Maintenance Window][8.8]Fix window maintenance workflow (#156427)\n\n## Summary\r\n\r\nThe way that we canceled every notification for our alert life cycle\r\nduring an active maintenance window was not close enough to what our\r\ncustomers were expecting. For our persisted security solution alerts, we\r\ndid not have to change the logic because it will always be a new alert.\r\nTherefore, @shanisagiv1, @mdefazio, @JiaweiWu, and @XavierM had a\r\ndiscussion about this problem and we decided this:\r\n\r\nTo summarize, we will only keep the notification during a maintenance\r\nwindow if an alert has been created/active outside of window\r\nmaintenance. We created three different scenarios to explain the new\r\nlogic and we will make the assumption that our alert has an action per\r\nstatus change. For you to understand the different scenarios, I created\r\nthis legend below:\r\n<img width=\"223\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236045974-f4fa379b-db5e-41f8-91a8-2689b9f24dab.png\">\r\n\r\n### Scenario I\r\nIf an alert is active/created before a maintenance window and recovered\r\ninside of the maintenance window then we will send notifications\r\n<img width=\"463\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236046473-d04df836-d3e6-42d8-97be-8b4f1544cc1a.png\">\r\n\r\n### Scenario II\r\nIf an alert is active/created and recovered inside of window maintenance\r\nthen we will NOT send notifications\r\n<img width=\"407\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236046913-c2f77131-9ff1-4864-9dab-89c4c429152e.png\">\r\n\r\n### Scenario III\r\nif an alert is active/created in a maintenance window and recovered\r\noutside of the maintenance window then we will not send notifications\r\n<img width=\"496\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236047613-e63efe52-87fa-419e-9e0e-965b1d10ae18.png\">\r\n\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"ea407983bbd6a364f23f6780ff1049f679f53488","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","backport","release_note:skip","Team:ResponseOps","Feature:Alerting/RulesManagement","v8.8.0","v8.9.0"],"number":156427,"url":"https://github.com/elastic/kibana/pull/156427","mergeCommit":{"message":"[RAM][Maintenance Window][8.8]Fix window maintenance workflow (#156427)\n\n## Summary\r\n\r\nThe way that we canceled every notification for our alert life cycle\r\nduring an active maintenance window was not close enough to what our\r\ncustomers were expecting. For our persisted security solution alerts, we\r\ndid not have to change the logic because it will always be a new alert.\r\nTherefore, @shanisagiv1, @mdefazio, @JiaweiWu, and @XavierM had a\r\ndiscussion about this problem and we decided this:\r\n\r\nTo summarize, we will only keep the notification during a maintenance\r\nwindow if an alert has been created/active outside of window\r\nmaintenance. We created three different scenarios to explain the new\r\nlogic and we will make the assumption that our alert has an action per\r\nstatus change. For you to understand the different scenarios, I created\r\nthis legend below:\r\n<img width=\"223\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236045974-f4fa379b-db5e-41f8-91a8-2689b9f24dab.png\">\r\n\r\n### Scenario I\r\nIf an alert is active/created before a maintenance window and recovered\r\ninside of the maintenance window then we will send notifications\r\n<img width=\"463\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236046473-d04df836-d3e6-42d8-97be-8b4f1544cc1a.png\">\r\n\r\n### Scenario II\r\nIf an alert is active/created and recovered inside of window maintenance\r\nthen we will NOT send notifications\r\n<img width=\"407\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236046913-c2f77131-9ff1-4864-9dab-89c4c429152e.png\">\r\n\r\n### Scenario III\r\nif an alert is active/created in a maintenance window and recovered\r\noutside of the maintenance window then we will not send notifications\r\n<img width=\"496\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236047613-e63efe52-87fa-419e-9e0e-965b1d10ae18.png\">\r\n\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"ea407983bbd6a364f23f6780ff1049f679f53488"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156427","number":156427,"mergeCommit":{"message":"[RAM][Maintenance Window][8.8]Fix window maintenance workflow (#156427)\n\n## Summary\r\n\r\nThe way that we canceled every notification for our alert life cycle\r\nduring an active maintenance window was not close enough to what our\r\ncustomers were expecting. For our persisted security solution alerts, we\r\ndid not have to change the logic because it will always be a new alert.\r\nTherefore, @shanisagiv1, @mdefazio, @JiaweiWu, and @XavierM had a\r\ndiscussion about this problem and we decided this:\r\n\r\nTo summarize, we will only keep the notification during a maintenance\r\nwindow if an alert has been created/active outside of window\r\nmaintenance. We created three different scenarios to explain the new\r\nlogic and we will make the assumption that our alert has an action per\r\nstatus change. For you to understand the different scenarios, I created\r\nthis legend below:\r\n<img width=\"223\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236045974-f4fa379b-db5e-41f8-91a8-2689b9f24dab.png\">\r\n\r\n### Scenario I\r\nIf an alert is active/created before a maintenance window and recovered\r\ninside of the maintenance window then we will send notifications\r\n<img width=\"463\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236046473-d04df836-d3e6-42d8-97be-8b4f1544cc1a.png\">\r\n\r\n### Scenario II\r\nIf an alert is active/created and recovered inside of window maintenance\r\nthen we will NOT send notifications\r\n<img width=\"407\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236046913-c2f77131-9ff1-4864-9dab-89c4c429152e.png\">\r\n\r\n### Scenario III\r\nif an alert is active/created in a maintenance window and recovered\r\noutside of the maintenance window then we will not send notifications\r\n<img width=\"496\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/189600/236047613-e63efe52-87fa-419e-9e0e-965b1d10ae18.png\">\r\n\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"ea407983bbd6a364f23f6780ff1049f679f53488"}}]}] BACKPORT--> Co-authored-by: Jiawei Wu <74562234+JiaweiWu@users.noreply.github.com>
- Loading branch information