[Metrics UI] Correct inaccurate offsetting for non-rate aggregations inside of metrics threshold alerts#106947
Merged
phillipb merged 8 commits intoelastic:masterfrom Jul 28, 2021
Merged
Conversation
Contributor
|
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
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
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
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
Contributor
💚 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
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Offsetwas 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.