Skip to content
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
merged 8 commits into from
Jul 28, 2021

Conversation

phillipb
Copy link
Contributor

@phillipb phillipb commented Jul 28, 2021

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.

@phillipb 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
@phillipb phillipb requested a review from a team as a code owner July 28, 2021 02:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@phillipb phillipb changed the title Alert on partial buckets [Metrics UI] Alert on partial buckets Jul 28, 2021
@phillipb phillipb changed the title [Metrics UI] Alert on partial buckets [Metrics UI] Alert on all buckets Jul 28, 2021
@jasonrhodes 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
Copy link
Contributor

@Zacqary Zacqary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

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
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
Projects
None yet
5 participants