-
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
[Response Ops] [Alerting] Unflattening summarized alerts #147890
Conversation
60d23ea
to
78c2c07
Compare
Pinging @elastic/response-ops (Team:ResponseOps) |
|
||
const expandFlattenedAlert = (alert: object) => { | ||
if (Array.isArray(alert)) { | ||
return alert; |
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.
Could an alert-as-data record be an array?
I though it's always like:
{
'kibana.alert.id':'5'
'kibana.alert.name':'name'
}
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.
Probably not. I took this from detection rules library functions 🙈. I can remove the check
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 was going to check how security solutions did it :)
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
…g/summary-alert-format
💚 Build Succeeded
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: cc @ymao1 |
) Towards elastic#147379 ## Summary When investigating how to [onboard detection alerts onto framework alert summaries](elastic#147379), there were some discrepancies in the format of the alert documents returned. This PR fixes the formatting so it matches and there will be no difference in `context.alerts` when we migrate detection alerts to the framework. ### 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
Towards #147379
Summary
When investigating how to onboard detection alerts onto framework alert summaries, there were some discrepancies in the format of the alert documents returned. This PR fixes the formatting so it matches and there will be no difference in
context.alerts
when we migrate detection alerts to the framework.Checklist