-
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
[Alerts] Added API to find all alerts instances by the filters like consumers, status(active, ...), etc. #88224
Closed
YulNaumenko
wants to merge
13
commits into
elastic:master
from
YulNaumenko:alerts-get-active-instances-2
Closed
[Alerts] Added API to find all alerts instances by the filters like consumers, status(active, ...), etc. #88224
YulNaumenko
wants to merge
13
commits into
elastic:master
from
YulNaumenko:alerts-get-active-instances-2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…onsumers, status(active, ...), etc.
YulNaumenko
added
Feature:Alerting
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
v7.12.0
v8.0.0
release_note:skip
Skip the PR/issue when compiling release notes
labels
Jan 18, 2021
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
💔 Build Failed
Failed CI StepsTest FailuresJest Tests.x-pack/plugins/alerts/server/alerts_client/tests.findAlertsWithInstancesSummary() runs as expected with some event log dataStandard Out
Stack Trace
Jest Tests.x-pack/plugins/alerts/server/alerts_client/tests.findAlertsWithInstancesTimeline() runs as expected with some event log dataStandard Out
Stack Trace
Jest Tests.x-pack/plugins/alerts/server/alerts_client/tests.findAlertsWithInstancesTimeline() calls saved objects and event log client with default paramsStandard Out
Stack Trace
and 5 more failures, only showing the first 3. Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Closing this PR with the purpose to provide a different better approach to get alert instances summary statuses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Alerting
needs_docs
release_note:skip
Skip the PR/issue when compiling release notes
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
v7.13.0
v8.0.0
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.
Current PR includes two alertsClient methods:
/api/alerts/_find_alerts_with_instances_summary
designed to return alerts list with summary for its instances by the filter on alert object props and dateStart, dateEnd, instancesStatus and instancesMuted. Example:Request:
https://localhost:5601/ihp/api/alerts/_find_alerts_with_instances_summary?page=1&per_page=10&search_fields=%5B%22name%22%2C%22consumer%22%5D&search=alerts&default_search_operator=AND&sort_field=name.keyword&date_start=2021-01-15T00:59:40.935Z&instances_status=Active&instances_muted=false
filter options (paging, search, sort, etc) is applied on the alert object and in addition there are an options for instances filtering:
date_start=2021-01-14T00:59:40.935Z
date_end=2021-01-15T00:59:40.935Z
instances_status=Active
instances_muted=false
Response:
/api/alerts/_find_alerts_with_instances_timeline
designed to return alerts list with its instances activity log by the selected filter on alerts props and dateStart, dateEnd, instancesStatus. Example:Request:
https://localhost:5601/pbl/api/alerts/_find_alerts_with_instances_timeline?page=1&per_page=10&search_fields=%5B%22name%22%2C%22consumer%22%5D&search=alerts&default_search_operator=AND&sort_field=name.keyword&date_start=2021-01-19T21:58:54.356Z&date_end=2021-01-19T22:01:13.661Z
filter options (paging, search, sort, etc) is applied on the alert object and in addition there are an options for instances filtering:
date_start=2021-01-14T00:59:40.935Z
date_end=2021-01-15T00:59:40.935Z
instances_status=Active
Response:
Resolve #70169