Skip to content

Conversation

@peteharverson
Copy link
Contributor

Fixes the loading of data for the chart in the Single Metric Viewer for jobs where the bucket span is a multiple of a week (or higher) unit (e.g. 14d, 28d).

Multi unit durations are now converted to a maximum unit of days, where before they could be converted to weeks or longer, since units greater than d are not supported for use as durations in elasticsearch (see https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units). So whilst it is ok to convert a duration of 60s to 1m, converting a duration of 14d to 2w will cause an error when used in an aggregation.

Example of a job with a bucket span of 14d now being displayed correctly in the Single Metric Viewer:

image

Fixes #19720

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@peteharverson peteharverson merged commit af5215f into elastic:master Jun 11, 2018
@peteharverson peteharverson deleted the ml-time-bucket-interval branch June 11, 2018 08:43
maryia-lapata pushed a commit to maryia-lapata/kibana that referenced this pull request Jun 25, 2018
)

* [ML] Fix Single Metric Viewer for multi week bucket spans

* [ML] Edit to comment in ML time buckets calcEsInterval
@sophiec20 sophiec20 added the Feature:Anomaly Detection ML anomaly detection label Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] Single metric viewer doesn't work if bucket span is a multiple of a week (or higher) unit

5 participants