Skip to content
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

[RAM] Consolidating rule statuses #136039

Closed
6 of 7 tasks
XavierM opened this issue Jul 8, 2022 · 2 comments
Closed
6 of 7 tasks

[RAM] Consolidating rule statuses #136039

XavierM opened this issue Jul 8, 2022 · 2 comments
Assignees
Labels
Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@XavierM
Copy link
Contributor

XavierM commented Jul 8, 2022

RFC -> https://docs.google.com/document/d/1-tMHRS3liqhHf8YGVqR93rZg3zdoDe2nEfptkOw1Q-E/edit#heading=h.1w0d61eheso3

Spreadsheet containing references to executionStatus->status that will need to be changed: https://docs.google.com/spreadsheets/d/1_KC-vV2D3qxkLMY0YSoeodi91hyHMYstH_7AVxsL_wo/edit?usp=sharing

  • Update rule's saved object (@XavierM)
  • Update task manager to only have three statuses (@JiaweiWu)
  • Update API in rules client (@JiaweiWu will create a list to figure out and assign between each other to move forward faster)
  • Create migration for rules status to still work (@JiaweiWu @XavierM)
  • Update UI in rules lists page (filter/status graph) (@JiaweiWu will create a list to figure out and assign between each other to move forward faster)
  • Create a new monitoring services so rule creator can save their monitoring (@XavierM)
  • Make sure security solution is still working as expected (@XavierM)
@XavierM XavierM added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Jul 8, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@JiaweiWu JiaweiWu linked a pull request Oct 19, 2022 that will close this issue
XavierM added a commit that referenced this issue Nov 14, 2022
## Summary

Resolves the parent issue:
#136039

Also resolves the subtasks:
 - #143461
 - #143460

This is the backend portion of the consolidated rule status feature. It
mainly contains changes to the `rules_client.ts` and `task_runner.ts` to
support the new consolidated rule statuses.

This PR added a new property: `lastRun` to the rules saved object to
hold the new rule outcome statuses (`succeeded`, `warning`, and
`failed`) as the new simplified rule status over the existing
`executionStatus` property. However, we are keeping the old
`executionStatus` so we can slowly migrate the rest of the application
to use the new `lastRun` outcomes.

In addition, we have enriched the `monitoring` property to be the source
of truth for metrics related to the last run (as well as new fields that
other plugins will find useful). We also added a monitoring service that
allows other plugins to easily add data to the monitoring field.

To test this PR, please use
#144466 since it has both the
frontend and backend changes.

### Checklist
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jiawei Wu <jiawei.wu@cmd.com>
JiaweiWu added a commit that referenced this issue Nov 15, 2022
## Summary
Parent issue for updating rule status:
#136039
Frontend issue: #145191

Backend PR: #140882

Updates the rules list and rules details page to support the new
consolidated statuses. With E2E and unit testing.

Rules list:
- Table cell values
- Last response filter
- Table cell filtering
- Status aggregations

Rule details:
- Rule status summary
- KPI headers renaming
- Event log cells renaming


![dashdash](https://user-images.githubusercontent.com/74562234/201778676-775f58e9-6707-4972-a1ca-2dcf71befc5b.png)


![rule_details_consolidate](https://user-images.githubusercontent.com/74562234/201778792-f03c368a-3b0d-43cf-805e-f8151b4b96ae.png)

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
benakansara pushed a commit to benakansara/kibana that referenced this issue Nov 17, 2022
## Summary
Parent issue for updating rule status:
elastic#136039
Frontend issue: elastic#145191

Backend PR: elastic#140882

Updates the rules list and rules details page to support the new
consolidated statuses. With E2E and unit testing.

Rules list:
- Table cell values
- Last response filter
- Table cell filtering
- Status aggregations

Rule details:
- Rule status summary
- KPI headers renaming
- Event log cells renaming


![dashdash](https://user-images.githubusercontent.com/74562234/201778676-775f58e9-6707-4972-a1ca-2dcf71befc5b.png)


![rule_details_consolidate](https://user-images.githubusercontent.com/74562234/201778792-f03c368a-3b0d-43cf-805e-f8151b4b96ae.png)

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@JiaweiWu
Copy link
Contributor

@XavierM will create another ticket for testing security solutions. 🎉

LeeDr pushed a commit to LeeDr/kibana that referenced this issue Nov 18, 2022
LeeDr pushed a commit that referenced this issue Nov 18, 2022
## Summary

Rule "Last response" changed from OK to Succeeded. See
#136039
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 18, 2022
## Summary

Rule "Last response" changed from OK to Succeeded. See
elastic#136039

(cherry picked from commit 73cf0a2)
kibanamachine added a commit that referenced this issue Nov 19, 2022
# Backport

This will backport the following commits from `main` to `8.6`:
- [[upgrade] change OK to Succeeded in rules test
(#145770)](#145770)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lee
Drengenberg","email":"lee.drengenberg@elastic.co"},"sourceCommit":{"committedDate":"2022-11-18T23:28:53Z","message":"[upgrade]
change OK to Succeeded in rules test (#145770)\n\n## Summary\r\n\r\nRule
\"Last response\" changed from OK to Succeeded.
See\r\nhttps://github.com//issues/136039","sha":"73cf0a2ac6bb88d0e01ac783970a793261028ac2","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:QA","release_note:skip","backport:prev-minor","v8.6.0","v8.7.0"],"number":145770,"url":"https://github.com/elastic/kibana/pull/145770","mergeCommit":{"message":"[upgrade]
change OK to Succeeded in rules test (#145770)\n\n## Summary\r\n\r\nRule
\"Last response\" changed from OK to Succeeded.
See\r\nhttps://github.com//issues/136039","sha":"73cf0a2ac6bb88d0e01ac783970a793261028ac2"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145770","number":145770,"mergeCommit":{"message":"[upgrade]
change OK to Succeeded in rules test (#145770)\n\n## Summary\r\n\r\nRule
\"Last response\" changed from OK to Succeeded.
See\r\nhttps://github.com//issues/136039","sha":"73cf0a2ac6bb88d0e01ac783970a793261028ac2"}}]}]
BACKPORT-->

Co-authored-by: Lee Drengenberg <lee.drengenberg@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants