-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Alerting] add more alert properties to action parameter templating #59718
[Alerting] add more alert properties to action parameter templating #59718
Conversation
This is a pre-cursor to elastic#58529 I realized a bit ago that we weren't making quite enough info available in the action parameter templating that happens when alerts schedule actions to execute. Missing were alert name, tags, and spaceId. For the index threshold alert, I had added them to it's context, but then every other action would have to do the same if they also wanted those values. So I added these as additional top-level variables that can be used in templates, along with the alert id, alert instance id, context, and state. The other bits in RawAlert didn't seem that interesting, to be used as an action parameter.
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
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.
Changes LGTM, I wonder if we need to reach out to solution teams about potential breaking changes? (since I believe this removes some fields from context
)
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.
I think it's just a breaking change for the index threshold alertType - removal of some of the context variables, which are now available as top-level variables instead of under We could add them back to the indexThreshold alert type, in their description (in PR #59756 ) we could note them as "deprecated" or something. Or maybe I missed something, in terms of a breaking change. My intention was to only have a breaking change to the indexThreshold alertType's context variables. |
Doh! You are right, this is index threshold specific! I somehow thought All good! |
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…lastic#59718) This is a pre-cursor to elastic#58529 I realized a bit ago that we weren't making quite enough info available in the action parameter templating that happens when alerts schedule actions to execute. Missing were alert name, tags, and spaceId. For the index threshold alert, I had added them to it's context, but then every other action would have to do the same if they also wanted those values. So I added these as additional top-level variables that can be used in templates, along with the alert id, alert instance id, context, and state. The other bits in RawAlert didn't seem that interesting, to be used as an action parameter.
…59718) (#59829) This is a pre-cursor to #58529 I realized a bit ago that we weren't making quite enough info available in the action parameter templating that happens when alerts schedule actions to execute. Missing were alert name, tags, and spaceId. For the index threshold alert, I had added them to it's context, but then every other action would have to do the same if they also wanted those values. So I added these as additional top-level variables that can be used in templates, along with the alert id, alert instance id, context, and state. The other bits in RawAlert didn't seem that interesting, to be used as an action parameter.
* master: [ML] Transforms: Use EuiInMemoryTable instead of custom typed table. (elastic#59782) Alerting/fix flaky instance test (elastic#58994) ci: disable all Mocha rules for tape tests (elastic#59798) Fix UX in alerting UI forms when errors occur (elastic#59444) [DOCS] Updated and added jump tables (elastic#59774) [DOCS] Moved rolled up index content (elastic#59372) Regenerate core api docs (elastic#59814) [Lens] remove react warnings (elastic#59574) The scripts/backport.js file isn't an executable (elastic#59800) [Alerting] add more alert properties to action parameter templating (elastic#59718) [Design] Branding changes in Elastic to focus more towards the Elastic brand (elastic#58160) [SIEM] Adds 'Create new rule' Cypress test (elastic#59790) Updating svgo -> css-tree -> mdn-data, all so we get mdn-data > 2.0 (elastic#58913) Use EUI test environment build with Jest (elastic#55877) update typescript version in all packages to avoid warnings (elastic#59787) [SIEM] [Case] Insert timeline into case textarea (elastic#59586) [ML] Functional tests - stabilize saved search tests (elastic#59652)
This is a pre-cursor to #58529
I realized a bit ago that we weren't making quite enough info available
in the action parameter templating that happens when alerts schedule
actions to execute. Missing were alert name, tags, and spaceId.
For the index threshold alert, I had added them to it's context, but
then every other action would have to do the same if they also
wanted those values.
So I added these as additional top-level variables that can be
used in templates, along with the alert id, alert instance id,
context, and state. The other bits in RawAlert didn't seem
that interesting, to be used as an action parameter.