-
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 Alerts] Add support for search query and groupBy on alerts #59388
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
@elastic/kibana-alerting-services This dynamically creates new alert instances but doesn't delete them. Would this create a potential problem? For example, if we have an alert grouped by Would that be an issue, or is the alerting system able to handle that? |
We optimize on that, actually :-) Currently, if your alert executor does not schedule actions on an alertInstance, the alertInstance "goes away". That could be a problem if you were expecting it to stick around, and we have an issue open to figure that part out. But we figured the best default was to let them get "garbage collected" over time, if you didn't schedule any actions on them. So, if I understand correctly, you should be fine. |
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.
Looks good. A couple of tiny things.
...k/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts
Outdated
Show resolved
Hide resolved
...k/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts
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!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…lastic#59388) * Add filterQuery to metric alert params * Add groupBy alert support * Fix typings * Fix malformed query * Fix filterQuery merge * Fix groupBy afterkey insertion, add group name to alert action * Convert iife to getter * Fix type check * Fix type check again * Remove unnecessary order param
* master: Add a retry to dashboard test for a sometimes slow async operation (elastic#59600) [Endpoint] Sample data generator for endpoint app (elastic#58936) [Vis Editor] Refactoring metrics axes (elastic#59135) [DOCS] Changed Discover app to Discover (elastic#59769) [Metrics Alerts] Add support for search query and groupBy on alerts (elastic#59388) Enhancement - EUICodeEditor for Visualize JSON (elastic#58679) [ML] Transforms: Data grid fixes. (elastic#59538) [SIEM] Fix and consolidate handling of error responses in the client (elastic#59438) [Maps] convert tooltip classes to typescript (elastic#59589) [ML] Functional tests - re-activate date_nanos test (elastic#59649) Move canvas to use NP Expressions service (elastic#58387) Update misc dependencies (elastic#59542) [Unit Testing] Configure react-testing-library queries to use Kibana's data-test-subj instead of default data-testid (elastic#59445) [Console] Remove unused code (elastic#59554) [Logs / Metrics UI] Link handling / stop page reloads (elastic#58478) Add SavedObject management section registration in core (elastic#59291)
…59388) (#59773) * Add filterQuery to metric alert params * Add groupBy alert support * Fix typings * Fix malformed query * Fix filterQuery merge * Fix groupBy afterkey insertion, add group name to alert action * Convert iife to getter * Fix type check * Fix type check again * Remove unnecessary order param
Summary
Closes #58290
filterQuery
to an alert. This should be a Kuery converted to an Elasticsearch query, e.g. the JSON blob generated by the search bar on the Metrics ExplorergroupBy
parameter to an alert. This will generate analertInstance
for every group found, and should dynamically add new instances if new groups are found after the alert is created.getAllCompositeData
function so that it no longer needs to be passed aframework
andrequestContext
, and updated the Snapshot library's use of itChecklist
Delete any items that are not applicable to this PR.
[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibility[ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser[ ] This was checked for cross-browser compatibility, including a check against IE11For maintainers