-
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
Add alert grouping functionality to the observability alerts page #189958
Add alert grouping functionality to the observability alerts page #189958
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
content={ | ||
<FormattedMessage | ||
id="xpack.observability.alert.grouping.ungrouped.info" | ||
defaultMessage='There is no "group by" field selected in rule definition.' |
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.
/ci |
...ins/observability_solution/observability/public/pages/alerts/grouping/render_group_panel.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: DeDe Morton <[email protected]>
// Alert page | ||
const alertsPageAlertsTableConfig = getAlertsPageTableConfiguration( | ||
// Observability table | ||
const observabilityAlertsTableConfig = getObservabilityTableConfiguration( |
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 registered a new alerts table with an observability ID, which is used on other applications as well. (Basically, this already existed)
alertTableConfigRegistry.register(observabilityAlertsTableConfig); | ||
|
||
// Alerts page | ||
const alertsPageAlertsTableConfig = getAlertsPageTableConfiguration( |
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.
This is the new table with grouping, only for the alerts page for now.
/ci |
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! 🚀
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
export function Tags({ | ||
tags, | ||
color, | ||
size = 3, | ||
oneLine = false, | ||
}: { | ||
tags: string[]; | ||
color?: string; | ||
size?: number; | ||
oneLine?: boolean; |
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.
there is same kinda component exported from observability-shared, might be nice to use that
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.
Nice! I will check it out!
… aggregations endpoint (#190305) ## Summary - Adds null-value bucket detection to server-side alerts aggregations and marks those groups with a `--` key and `isNullGroup = true`. - Improves alerts grouping types with default aggregations. - Improves documentation ## To verify 1. Temporarily merge [#189958](#189958) into this branch 2. Create a rule that fires alerts in Observability > Alerts (i.e. Custom Threshold, ES Query, ...) 3. Once you start to see some alerts in the Alerts page, toggle the grouped alerts view using the dropdown at the top-right of the table (`Group alerts by: ...`), selecting a custom field that doesn't have a value in alert documents (to find one, open the alert flyout and look at the fields table) 4. Check that the group based on the empty field shows `--` as a title 5. Check that the alerts table in the expanded group panel is filtered correctly ### References Refs [#189958](#189958) ### Checklist Delete any items that are not applicable to this PR. - [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
/ci |
/ci |
/oblt-deploy |
/oblt-deploy |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsasync chunk count
miscellaneous assets size
History
To update your PR or re-run it, just comment with: |
filter: [ | ||
{ | ||
query: { | ||
match_phrase: { | ||
[ALERT_STATUS]: ALERT_STATUS_ACTIVE, | ||
}, | ||
}, | ||
meta: {}, | ||
}, | ||
], |
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.
it's already specified in query so why needed as separate filter?
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.
Alert grouping component accepts filters, not queries, but we use queries in other places. Maybe, in the future, we can refactor places that we use query and use filter instead.
...plugins/observability_solution/observability/public/components/alert_search_bar/constants.ts
Show resolved
Hide resolved
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 !!
Closes #190995
Summary
This PR adds grouping functionality to the alerts page alert table based on @umbopepato's implementation in this draft PR (basically, he implemented the feature and I adjusted a bit for our use case :D).
For now, we only added the rule and source as default grouping, and I will create a ticket to add tags as well. The challenge with tags is that since it is an array, the value of the alert is joined by a comma as the group, which does not match with what we want for tags.
Here is how we show the rules that don't have a group by field selected for them: (We used "ungrouped" similar to what we have in SLOs)