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
[Response Ops][Actions] Fixing bug where context variables are not passed in when alerts as data doc is available in action params #175682
Conversation
/ci |
Pinging @elastic/response-ops (Team:ResponseOps) |
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 - works as expected
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @ymao1 |
…ssed in when alerts as data doc is available in action params (elastic#175682) Resolves elastic#175624 ## Summary Fixes a bug where context and state variables were not passed to the action params for interpolation if the alert-as-data document is available. ## To Verify * Create a rule and add an action that fires `For each alert - on check intervals` * Add a condition to the action, either a KQL query or a time range * Make sure the action message references some context variables (default ES query or Index Threshold rule messages should include context variables) * Save the rule and make sure the action fired correctly includes the referenced context variables. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 8a6ee8a)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… not passed in when alerts as data doc is available in action params (#175682) (#175737) # Backport This will backport the following commits from `main` to `8.12`: - [[Response Ops][Actions] Fixing bug where context variables are not passed in when alerts as data doc is available in action params (#175682)](#175682) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ying Mao","email":"ying.mao@elastic.co"},"sourceCommit":{"committedDate":"2024-01-26T21:36:35Z","message":"[Response Ops][Actions] Fixing bug where context variables are not passed in when alerts as data doc is available in action params (#175682)\n\nResolves #175624 Summary\r\n\r\nFixes a bug where context and state variables were not passed to the\r\naction params for interpolation if the alert-as-data document is\r\navailable.\r\n\r\n## To Verify\r\n* Create a rule and add an action that fires `For each alert - on check\r\nintervals`\r\n* Add a condition to the action, either a KQL query or a time range\r\n* Make sure the action message references some context variables\r\n(default ES query or Index Threshold rule messages should include\r\ncontext variables)\r\n* Save the rule and make sure the action fired correctly includes the\r\nreferenced context variables.\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"8a6ee8a4c0df7f687c57748c1e9f1155167b00aa","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:Actions","Team:ResponseOps","v8.12.1","v8.13.0"],"title":"[Response Ops][Actions] Fixing bug where context variables are not passed in when alerts as data doc is available in action params","number":175682,"url":"#175682 Ops][Actions] Fixing bug where context variables are not passed in when alerts as data doc is available in action params (#175682)\n\nResolves #175624 Summary\r\n\r\nFixes a bug where context and state variables were not passed to the\r\naction params for interpolation if the alert-as-data document is\r\navailable.\r\n\r\n## To Verify\r\n* Create a rule and add an action that fires `For each alert - on check\r\nintervals`\r\n* Add a condition to the action, either a KQL query or a time range\r\n* Make sure the action message references some context variables\r\n(default ES query or Index Threshold rule messages should include\r\ncontext variables)\r\n* Save the rule and make sure the action fired correctly includes the\r\nreferenced context variables.\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"8a6ee8a4c0df7f687c57748c1e9f1155167b00aa"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"#175682 Ops][Actions] Fixing bug where context variables are not passed in when alerts as data doc is available in action params (#175682)\n\nResolves #175624 Summary\r\n\r\nFixes a bug where context and state variables were not passed to the\r\naction params for interpolation if the alert-as-data document is\r\navailable.\r\n\r\n## To Verify\r\n* Create a rule and add an action that fires `For each alert - on check\r\nintervals`\r\n* Add a condition to the action, either a KQL query or a time range\r\n* Make sure the action message references some context variables\r\n(default ES query or Index Threshold rule messages should include\r\ncontext variables)\r\n* Save the rule and make sure the action fired correctly includes the\r\nreferenced context variables.\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"8a6ee8a4c0df7f687c57748c1e9f1155167b00aa"}}]}] BACKPORT--> Co-authored-by: Ying Mao <ying.mao@elastic.co>
…ssed in when alerts as data doc is available in action params (elastic#175682) Resolves elastic#175624 ## Summary Fixes a bug where context and state variables were not passed to the action params for interpolation if the alert-as-data document is available. ## To Verify * Create a rule and add an action that fires `For each alert - on check intervals` * Add a condition to the action, either a KQL query or a time range * Make sure the action message references some context variables (default ES query or Index Threshold rule messages should include context variables) * Save the rule and make sure the action fired correctly includes the referenced context variables. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…ssed in when alerts as data doc is available in action params (elastic#175682) Resolves elastic#175624 ## Summary Fixes a bug where context and state variables were not passed to the action params for interpolation if the alert-as-data document is available. ## To Verify * Create a rule and add an action that fires `For each alert - on check intervals` * Add a condition to the action, either a KQL query or a time range * Make sure the action message references some context variables (default ES query or Index Threshold rule messages should include context variables) * Save the rule and make sure the action fired correctly includes the referenced context variables. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Resolves #175624
Summary
Fixes a bug where context and state variables were not passed to the action params for interpolation if the alert-as-data document is available.
To Verify
For each alert - on check intervals