-
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
[ResponseOps] The count of consecutive active alerts should be available on the alert #177522
Conversation
ci/ |
/ci |
/ci |
/ci |
/ci |
/ci |
/ci |
Pinging @elastic/response-ops (Team:ResponseOps) |
@doakalexi we had a forgotten dependency with alerts in the data-stream-adapter package, I removed that here. Could you please pull the changes, then you'll be able to remove |
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.
Verified that this works as expected. Tested with ES query rule, custom threshold rule (that uses lifecycle executor) and security rule. Left one comment about the new field in the technical field names. I don't think the field should be showing up in the generated security schema, just the framework alert_schema
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.
LGTM! Verified works as expected
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…ble on the alert (elastic#177522) Resolves elastic#175998 ## Summary Follow on work from the alert creation delay feature. This PR adds consecutive_matches, which is the count of active alerts that is used to determine the alert delay, to the aad doc and to the action variables. ### 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 ### To verify - Create a new rule with an alert delay - Add the new `alert.consecutiveMatches` action variable to the action message. Verify that when the alert fires the action variable is populated in the message. - To verify that the alert docs are as expected, go to [Dev Tools](http://localhost:5601/app/dev_tools#/console) and run the following `GET .internal.alerts-*/_search` - Go back to the rule alerts table, and add the `kibana.alert.consecutive_matches` field to the table. Verify that it is populated and looks as expected. (cherry picked from commit 3c2956c)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… available on the alert (#177522) (#178541) # Backport This will backport the following commits from `main` to `8.13`: - [[ResponseOps] The count of consecutive active alerts should be available on the alert (#177522)](#177522) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alexi Doak","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-03-12T16:36:19Z","message":"[ResponseOps] The count of consecutive active alerts should be available on the alert (#177522)\n\nResolves https://github.com/elastic/kibana/issues/175998\r\n\r\n## Summary\r\nFollow on work from the alert creation delay feature. This PR adds\r\nconsecutive_matches, which is the count of active alerts that is used to\r\ndetermine the alert delay, to the aad doc and to the action variables.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [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### To verify\r\n\r\n- Create a new rule with an alert delay\r\n- Add the new `alert.consecutiveMatches` action variable to the action\r\nmessage. Verify that when the alert fires the action variable is\r\npopulated in the message.\r\n- To verify that the alert docs are as expected, go to [Dev\r\nTools](http://localhost:5601/app/dev_tools#/console) and run the\r\nfollowing `GET .internal.alerts-*/_search`\r\n- Go back to the rule alerts table, and add the\r\n`kibana.alert.consecutive_matches` field to the table. Verify that it is\r\npopulated and looks as expected.","sha":"3c2956cd0cd4b97dd1c6e6673c5954c69337b790","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v8.13.0","v8.14.0"],"title":"[ResponseOps] The count of consecutive active alerts should be available on the alert","number":177522,"url":"https://github.com/elastic/kibana/pull/177522","mergeCommit":{"message":"[ResponseOps] The count of consecutive active alerts should be available on the alert (#177522)\n\nResolves https://github.com/elastic/kibana/issues/175998\r\n\r\n## Summary\r\nFollow on work from the alert creation delay feature. This PR adds\r\nconsecutive_matches, which is the count of active alerts that is used to\r\ndetermine the alert delay, to the aad doc and to the action variables.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [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### To verify\r\n\r\n- Create a new rule with an alert delay\r\n- Add the new `alert.consecutiveMatches` action variable to the action\r\nmessage. Verify that when the alert fires the action variable is\r\npopulated in the message.\r\n- To verify that the alert docs are as expected, go to [Dev\r\nTools](http://localhost:5601/app/dev_tools#/console) and run the\r\nfollowing `GET .internal.alerts-*/_search`\r\n- Go back to the rule alerts table, and add the\r\n`kibana.alert.consecutive_matches` field to the table. Verify that it is\r\npopulated and looks as expected.","sha":"3c2956cd0cd4b97dd1c6e6673c5954c69337b790"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177522","number":177522,"mergeCommit":{"message":"[ResponseOps] The count of consecutive active alerts should be available on the alert (#177522)\n\nResolves https://github.com/elastic/kibana/issues/175998\r\n\r\n## Summary\r\nFollow on work from the alert creation delay feature. This PR adds\r\nconsecutive_matches, which is the count of active alerts that is used to\r\ndetermine the alert delay, to the aad doc and to the action variables.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [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### To verify\r\n\r\n- Create a new rule with an alert delay\r\n- Add the new `alert.consecutiveMatches` action variable to the action\r\nmessage. Verify that when the alert fires the action variable is\r\npopulated in the message.\r\n- To verify that the alert docs are as expected, go to [Dev\r\nTools](http://localhost:5601/app/dev_tools#/console) and run the\r\nfollowing `GET .internal.alerts-*/_search`\r\n- Go back to the rule alerts table, and add the\r\n`kibana.alert.consecutive_matches` field to the table. Verify that it is\r\npopulated and looks as expected.","sha":"3c2956cd0cd4b97dd1c6e6673c5954c69337b790"}}]}] BACKPORT--> --------- Co-authored-by: Alexi Doak <[email protected]>
Resolves #175998
Summary
Follow on work from the alert creation delay feature. This PR adds consecutive_matches, which is the count of active alerts that is used to determine the alert delay, to the aad doc and to the action variables.
Checklist
To verify
alert.consecutiveMatches
action variable to the action message. Verify that when the alert fires the action variable is populated in the message.GET .internal.alerts-*/_search
kibana.alert.consecutive_matches
field to the table. Verify that it is populated and looks as expected.