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

[TSVB] Average metric works incorrectly with histogram data type when index pattern contains wildcard #73088

Closed
kertal opened this issue Jul 23, 2020 · 3 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@kertal
Copy link
Member

kertal commented Jul 23, 2020

Kibana version:
master, 7.9

Describe the bug:
TSVB support was introduced in #68837. When an index pattern contains a wildcard, average metric time series chart with fields of type histogram are not displayed correctly.

Steps to reproduce:
Add the following data:

PUT histogram-test1
{
  "mappings": {
    "properties": {
      "date": {
        "type": "date" 
      },
      "histogram-title": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword"
          }
        }
      },
      "histogram-content": {
        "type": "histogram"
      }
    }
  }
}

POST histogram-test1/_doc
{
  "date": "2020-06-24T21:12:13.000Z",
  "histogram-title": "enim veniam et",
  "histogram-content": {
    "values": [
      3.7,
      4.2
    ],
    "counts": [
      227,
      141
    ]
  }
}

POST histogram-test/_doc
{
  "date": "2020-06-23T21:12:13.000Z",
  "histogram-title": "est incididunt sunt",
  "histogram-content": {
    "values": [
      1.8,
      2.4,
      2.6,
      4.9
    ],
    "counts": [
      92,
      101,
      122,
      244
    ]
  }
}

POST histogram-test1/_doc
{
  "date": "2020-06-22T21:12:13.000Z",
  "histogram-title": "qui qui tempor",
  "histogram-content": {
    "values": [
      0.5,
      2.1,
      2.7,
      3,
      3.2,
      3.5,
      4.2,
      5
    ],
    "counts": [
      210,
      168,
      182,
      181,
      97,
      164,
      77,
      2
    ]
  }
}


POST histogram-test1/_doc
{
  "date": "2020-06-21T21:12:13.000Z",
  "histogram-title": "ullamco nisi sunt",
  "histogram-content": {
    "values": [
      1.7,
      4.5,
      4.8
    ],
    "counts": [
      74,
      146,
      141
    ]
  }
}

POST histogram-test1/_doc
{
  "date": "2020-06-20T21:12:13.000Z",
  "histogram-title": "magna eu incididunt",
  "histogram-content": {
    "values": [
      1,
      3.4,
      4.8
    ],
    "counts": [
      103,
      205,
      11
    ]
  }
}

Configure TSVB the following way:
image
image
image
then change the index pattern to contain a wildcard:
image
And you can no longer the whole histogram field, chart no longer works
image

@kertal kertal added bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 labels Jul 23, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@stratoula
Copy link
Contributor

@kertal in your data is missing the mapping for histogram-test. So it doesn't take the histogram type. If it is mapped correctly works as expected.

@kertal
Copy link
Member Author

kertal commented Aug 17, 2020

@stratoula thx, that's good news! closing this

@kertal kertal closed this as completed Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants