Skip to content

[Metrics UI] Fix evaluating rate-aggregated alerts when there's no normalized value#73545

Merged
Zacqary merged 4 commits intoelastic:masterfrom
Zacqary:metric-threshold-rate-nodata-fix
Jul 29, 2020
Merged

[Metrics UI] Fix evaluating rate-aggregated alerts when there's no normalized value#73545
Zacqary merged 4 commits intoelastic:masterfrom
Zacqary:metric-threshold-rate-nodata-fix

Conversation

@Zacqary
Copy link
Copy Markdown
Contributor

@Zacqary Zacqary commented Jul 28, 2020

Summary

Fixes a bug we uncovered when trying to preview a metric threshold alert with a Rate aggregator. The Rate agg is normally supposed to return buckets that look like this:

"aggregatedValue_max": {
  "value": 4.59
},
"aggregatedValue_deriv": {
  "value": 0.3199999999999994,
  "normalized_value": 0.0005333333333333323
},
"aggregatedValue": {
  "value": 0.0005333333333333323
}

However, since the executor is expecting aggregatedValue to exist, it errors out when encountering something like:

"aggregatedValue_max": {
  "value": null
}

or

"aggregatedValue_max": {
  "value": 5.72
},
"aggregatedValue_deriv": {
  "value": null,
  "normalized_value": null
}

This PR adds a handler for these cases. Rate-aggregated alerts will now evaluate as No Data in these cases (and will preview correctly)

Checklist

@Zacqary Zacqary 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.10.0 v7.9.0 labels Jul 28, 2020
@Zacqary Zacqary requested a review from a team as a code owner July 28, 2020 20:33
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@simianhacker simianhacker self-requested a review July 28, 2020 20:40
Copy link
Copy Markdown
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM... Confirmed the alerts are triggering and the preview works as expected.

@Zacqary
Copy link
Copy Markdown
Contributor Author

Zacqary commented Jul 29, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@Zacqary Zacqary merged commit f8ba95f into elastic:master Jul 29, 2020
@Zacqary Zacqary deleted the metric-threshold-rate-nodata-fix branch July 29, 2020 18:05
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 30, 2020
* master:
  [Vega][Inspector] Request panel should show correct names for requests (elastic#73655)
  [Security Solution] Update filter (elastic#73350)
  TSVB Inaccurate Group By (elastic#73683)
  [Vega][Inspect panel] Write tutorials and reference (elastic#73262)
  [ML] Removing node info check for file data viz import (elastic#73717)
  check that pathname has been updated. ignore other parts (elastic#73689)
  [build] rewrite source as transpiled JS later in the process (elastic#73749)
  Fix Snapshot Restore /policies/indices API endpoint on Cloud (elastic#73734)
  skip flaky suite (elastic#69783) (elastic#70043)
  [Security Solution][Exceptions] - Updates exception hooks and viewer (elastic#73588)
  skip failing suite (elastic#58815)
  [Canvas][fatal bug] Fix props confusion in TextStylePicker (elastic#73732)
  [DOCS] Changes level offset of monitoring pages (elastic#73573)
  Added close button to toast notifications by migrating to different API that is more widely used in Kibana and Security solution in particular. (elastic#73662)
  [ML] Transforms/DFA: Change action button size back to 'xs'.
  [Metrics UI] Fix evaluating rate-aggregated alerts when there's no normalized value (elastic#73545)
  [Metrics UI] Fix formatting of values in inventory context.reason (elastic#73155)
  [maps] rename GisMap to MapContainer and convert to TS (elastic#73690)
  [APM] docs: remove watcher documentation  (elastic#73485)
Zacqary added a commit to Zacqary/kibana that referenced this pull request Jul 30, 2020
…rmalized value (elastic#73545)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Zacqary added a commit to Zacqary/kibana that referenced this pull request Jul 30, 2020
…rmalized value (elastic#73545)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Zacqary added a commit that referenced this pull request Jul 31, 2020
… no normalized value (#73545) (#73884)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Zacqary added a commit that referenced this pull request Jul 31, 2020
… no normalized value (#73545) (#73883)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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.9.0 v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants