-
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
[Metrics UI] Correct inaccurate offsetting for non-rate aggregations inside of metrics threshold alerts #106947
Merged
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
phillipb
added
release_note:fix
Feature:Metrics UI
Metrics UI feature
v8.0.0
Team:Infra Monitoring UI - DEPRECATED
DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
v7.14.0
labels
Jul 28, 2021
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
phillipb
changed the title
Alert on partial buckets
[Metrics UI] Alert on partial buckets
Jul 28, 2021
jasonrhodes
reviewed
Jul 28, 2021
x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts
Outdated
Show resolved
Hide resolved
jasonrhodes
reviewed
Jul 28, 2021
x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts
Outdated
Show resolved
Hide resolved
jasonrhodes
reviewed
Jul 28, 2021
x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts
Show resolved
Hide resolved
phillipb
changed the title
[Metrics UI] Alert on partial buckets
[Metrics UI] Alert on all buckets
Jul 28, 2021
jasonrhodes
reviewed
Jul 28, 2021
x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts
Outdated
Show resolved
Hide resolved
jasonrhodes
reviewed
Jul 28, 2021
x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts
Show resolved
Hide resolved
jasonrhodes
reviewed
Jul 28, 2021
x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts
Outdated
Show resolved
Hide resolved
jasonrhodes
changed the title
[Metrics UI] Alert on all buckets
[Metrics UI] Correct inaccurate offsetting for non-rate aggregations inside of metrics threshold alerts
Jul 28, 2021
Zacqary
requested changes
Jul 28, 2021
x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts
Show resolved
Hide resolved
Zacqary
approved these changes
Jul 28, 2021
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!
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
phillipb
added a commit
that referenced
this pull request
Jul 29, 2021
…ations inside of metrics threshold alerts (#106947) (#107167) * [Metrics UI] Correct inaccurate offsetting for non-rate aggregations inside of metrics threshold alerts (#106947) * Don't skip last bucket for most aggs * Allow alerting on partial buckets for certain aggs * Fix test, PR feedback, and some comments * Remove all offset logic for date_range aggs * Remove code comment * Add delivery delay * Fix the date range for query * Add TODO * Port over changes from PR on master #104784 * Add missing change
Zacqary
pushed a commit
to Zacqary/kibana
that referenced
this pull request
Aug 6, 2021
…inside of metrics threshold alerts (elastic#106947) * Don't skip last bucket for most aggs * Allow alerting on partial buckets for certain aggs * Fix test, PR feedback, and some comments * Remove all offset logic for date_range aggs * Remove code comment * Add delivery delay * Fix the date range for query * Add TODO # Conflicts: # x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts # x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts
This was referenced Aug 6, 2021
Zacqary
pushed a commit
to Zacqary/kibana
that referenced
this pull request
Aug 6, 2021
…inside of metrics threshold alerts (elastic#106947) * Don't skip last bucket for most aggs * Allow alerting on partial buckets for certain aggs * Fix test, PR feedback, and some comments * Remove all offset logic for date_range aggs * Remove code comment * Add delivery delay * Fix the date range for query * Add TODO
Zacqary
added a commit
that referenced
this pull request
Aug 6, 2021
…inside of metrics threshold alerts (#106947) (#107821) * Don't skip last bucket for most aggs * Allow alerting on partial buckets for certain aggs * Fix test, PR feedback, and some comments * Remove all offset logic for date_range aggs * Remove code comment * Add delivery delay * Fix the date range for query * Add TODO Co-authored-by: Phillip Burch <phillip.burch@live.com>
Zacqary
added a commit
that referenced
this pull request
Aug 6, 2021
… aggregations inside of metrics threshold alerts (#106947) (#107820) * [Metrics UI] Correct inaccurate offsetting for non-rate aggregations inside of metrics threshold alerts (#106947) * Don't skip last bucket for most aggs * Allow alerting on partial buckets for certain aggs * Fix test, PR feedback, and some comments * Remove all offset logic for date_range aggs * Remove code comment * Add delivery delay * Fix the date range for query * Add TODO # Conflicts: # x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts # x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts * Fix bad merge * Fix bad merge Co-authored-by: Phillip Burch <phillip.burch@live.com>
streamich
pushed a commit
to vadimkibana/kibana
that referenced
this pull request
Aug 8, 2021
…inside of metrics threshold alerts (elastic#106947) * Don't skip last bucket for most aggs * Allow alerting on partial buckets for certain aggs * Fix test, PR feedback, and some comments * Remove all offset logic for date_range aggs * Remove code comment * Add delivery delay * Fix the date range for query * Add TODO
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Metrics UI
Metrics UI feature
release_note:fix
Team:Infra Monitoring UI - DEPRECATED
DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
v7.14.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.
Summary
Fixes #106887.
This PR drops all logic for offsets in data evaluation.
Offset
was introduced to avoid an issue with eventually consistent data, but because offset scales proportionally to the time span, the larger the evaluation period (e.g. for 12hrs), the more data we ignore. Instead, we are introducing a static "offset" of a minute for all evaluation periods to account for eventually consistent data.Note: This PR doesn't fix the alert preview charts. That'll require a change to the metrics API.