Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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][Security Solution][Alerts] Support the ability to trigger a rule action per alert generated (#153611) #155384
[RAM][Security Solution][Alerts] Support the ability to trigger a rule action per alert generated (#153611) #155384
Changes from all commits
77a53e0
7d7f8b7
afc00be
f305058
5d3de3e
04f5167
a1441e3
5d66c2a
bb45080
d65d992
e243d00
2be474e
7f2bbf3
6c94f85
15fcadf
5182466
aa6b8a1
806d0f8
32e4e79
8ce3ac4
ec1279c
e439fe1
27faf3f
c4385ae
629acfd
51f3e3c
08af15d
b2832bd
62a6b77
30b1c72
6948d0c
8567d91
696a454
4507d23
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
do we want to make the alert available in the context variable? or a result_link?
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.
Yeah I'm not seeing alert data available in
contxext.alerts
for the per alert actions - do you have to use a different mustache variable for per alert actions to get the alert data? If not, we should probably add it incontext.alerts
.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.
I intentionally removed
context.alerts
for per alert actions here. I was not sure whether we need it for the case when we have one alert only. I will add it back and make sure we passalerts
for single alert case as well, which will be justalerts: [alert]
.Also, as discussed earlier with Ying, I will add
results_link
which will be aalert[ALERT_URL]
for per alert action case.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.
@ymao1 @marshallmain I added
results_link: alert[ALERT_URL]
for per alert action. According to these changesalert[ALERT_URL]
can beundefined
. What would be a good alternative for theresults_link
in this case?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.
Hey @e40pud it can be undefined because it's based on the
server.publicBaseUrl
being set. We expect users to have that configured as connectors apparently won't work without it, but there's a chance they may not always have it configured. I'm not sure about what a smart alternative default would beThere 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.
Ya, there is no good alternative. In similar cases in alerting, we use
undefined
. It's possible to "if" this condition (falsy) in mustache, so customers can "mustache" it in or out, if it's there or not.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.
Note for future improvement: we can include the EQL building block alerts in the alerts context here so that the action-per-alert context for EQL sequences has the entire sequence
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.
Also we should call
formatAlert
on the alerts here before passing them into the actions 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.
Here is the ticket for this #155748
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.
Followup issue for
formatAlert
#155812