-
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][Actions] support mustache context variables with periods in the name #143703
[ResponseOps][Actions] support mustache context variables with periods in the name #143703
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
When I follow your verification steps, I do see that this is working but when I tried to create an ES query rule agains an alerts as data index, I'm not seeing it work. Here's what my alerts as data doc looks like:
And I have this in my action:
I see this in my sever log:
|
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.
Left some notes on the implementation, and request for some additional tests.
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!
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! Nice job :)
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Resolves #127748
Summary
When we encounter
context
fields with a.
in the name we expand it to an object and add it back to the context.Checklist
To verify
.
to the action message mustache template. Verify that the message contains the field value when the rule runs.This is what I did to verify, but you can choose to do what ever is easiest!
I kept adding documents to make sure my rule would hit on something.
with a sever log action that had the following message:
_source.my.field