elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.82k stars 8.21k forks source link

[ML] Single Metric Viewer chart bucketing does not align with job buckets for 7d spans #66414

Closed peteharverson closed 4 years ago

peteharverson commented 4 years ago

For jobs with a bucket span of 7 days, the alignment of the buckets in the chart does not always align with the buckets of the job results. This results in the anomaly markers being incorrectly positioned on the chart.

For example, using the iowa_liquor_sales_v2 data set, and a job config of:

"analysis_config": {
    "bucket_span": "7d",
    "detectors": [
      {
        "detector_description": "sum(sale_dollars) partitionfield=county",
        "function": "sum",
        "field_name": "sale_dollars",
        "partition_field_name": "county",
        "detector_index": 0
      }
    ],
    "influencers": [
      "county",
      "city"
    ]
  },

The marker for an anomaly record timed at February 26th 2015, 00:00:00 is plotted on the chart point for February 23rd:

image

The buckets for the chart need to be aligned with the result buckets, as they are in the Anomaly Explorer:

image

elasticmachine commented 4 years ago

Pinging @elastic/ml-ui (:ml)