-
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
[Metrics UI] Alerting for metrics explorer and inventory #58779
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
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 overal! But have a comment regarding toastNotifications.
x-pack/plugins/triggers_actions_ui/public/application/context/alerts_context.tsx
Outdated
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! Thank you for a change about toast messages.
@elasticmachine merge upstream |
Was a small type error, and is now fixed. |
Also note that when we select Document Count in the metrics explorer it removes the metric field entirely, but the alert flyout still requires us to select a metric. @simianhacker maybe we need to have a full discussion of how Document Count alerts should work? They're a stranger case than I think we originally anticipated. |
@Zacqary When you click the alerts action menu on the top of the screen, you're outside of the context of the graph. If you want to prepopulate the alert form, you should click |
@phillipb Right but that UX doesn't make sense for creating a |
Hmm, I can see the utility in that. It would require a pretty big refactor to support that use though. Could be something for a follow up PR. |
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
@elasticmachine merge upstream |
merge conflict between base and head |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* master: Fix formatter on range aggregation (elastic#58651) Goodbye, legacy data plugin 👋 (elastic#60449) [Metrics UI] Alerting for metrics explorer and inventory (elastic#58779)
* Add flyout with expressions * Integrate frontend with backend * Extended AlertContextValue with metadata optional property * Progress * Pre-fill criteria with current page filters * Better validation. Naming for clarity * Fix types for flyout * Respect the groupby property in metric explorer * Fix lint errors * Fix text, add toast notifications * Fix tests. Make sure update handles predefined expressions * Dynamically load source from alert flyout * Remove unused import * Simplify and add group by functionality * Remove unecessary useEffect * disable exhastive deps * Remove unecessary useEffect * change language * Implement design feedback * Add alert dropdown to the header and snapshot screen * Remove icon * Remove unused props. Code cleanup * Remove unused values * Fix formatted message id * Remove create alert option for now. * Fix type issue * Add rate, card and count as aggs * Fix types Co-authored-by: Yuliia Naumenko <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Henry Harding <[email protected]>
* master: (26 commits) [Alerting] Fixes flaky test in Alert Instances Details page (elastic#60893) cleanup visualizations api (elastic#59958) Inline timezoneProvider function, remove ui/vis/lib/timezone (elastic#60475) [SIEM] Adds 'Open one signal' Cypress test (elastic#60484) [UA] Upgrade assistant migration meta data can become stale (elastic#60789) [Metrics Alerts] Remove metric field from doc count on backend (elastic#60679) [Uptime] Skip failing location test temporarily (elastic#60938) [ML] Disabling datafeed editing when job is running (elastic#60751) Adding `authc.invalidateAPIKeyAsInternalUser` (elastic#60717) [SIEM] Add license check to ML Rule form (elastic#60691) Adding `authc.grantAPIKeyAsInternalUser` (elastic#60423) Support Histogram Data Type (elastic#59387) [Upgrade Assistant] Fix edge case where reindex op can falsely be seen as stale (elastic#60770) [SIEM] [Cases] Update case icons (elastic#60812) [TSVB] Fix percentiles band mode (elastic#60741) Fix formatter on range aggregation (elastic#58651) Goodbye, legacy data plugin 👋 (elastic#60449) [Metrics UI] Alerting for metrics explorer and inventory (elastic#58779) [Remote clustersadopt changes to remote info API (elastic#60795) Only run xpack siem cypress in PRs when there are siem changes (elastic#60661) ...
…0948) * Add flyout with expressions * Integrate frontend with backend * Extended AlertContextValue with metadata optional property * Progress * Pre-fill criteria with current page filters * Better validation. Naming for clarity * Fix types for flyout * Respect the groupby property in metric explorer * Fix lint errors * Fix text, add toast notifications * Fix tests. Make sure update handles predefined expressions * Dynamically load source from alert flyout * Remove unused import * Simplify and add group by functionality * Remove unecessary useEffect * disable exhastive deps * Remove unecessary useEffect * change language * Implement design feedback * Add alert dropdown to the header and snapshot screen * Remove icon * Remove unused props. Code cleanup * Remove unused values * Fix formatted message id * Remove create alert option for now. * Fix type issue * Add rate, card and count as aggs * Fix types Co-authored-by: Yuliia Naumenko <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Henry Harding <[email protected]> Co-authored-by: Yuliia Naumenko <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Henry Harding <[email protected]>
Summary
Add the alert flyout to the metric explorer and snapshot.
Metric Explorer
This PR allows creating alerts from a metrics chart, and from the header. When creating an alert from the chart, the flyout is pre-filled with conditions that correspond to the chart.
There is also the ability to create an
alert per
each distinct metric. For example, you can create an alert per hostname. This will allow you to create one alert for all hosts without needing to specify each exact hostname.Inventory
On the inventory page, you can create alerts from the header and from a specific node. If you select a node, the flyout is pre-filled with a filter that targets that node. The inventory also supports the
alert per
functionality.Flyout
The alert flyout uses the alerting teams AlertFlyout component. This comes with built-in actions, naming and frequency checks. We've extended it to support our need for multiple alert conditions, filtering and grouped alerts.
Fixes #56431, #56430, #56429
Checklist
Delete any items that are not applicable to this PR.