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 wrong default date field on default index-pattern #36264

Closed
markov00 opened this issue May 8, 2019 · 0 comments · Fixed by #36519
Closed

TSVB wrong default date field on default index-pattern #36264

markov00 opened this issue May 8, 2019 · 0 comments · Fixed by #36519
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) regression

Comments

@markov00
Copy link
Member

markov00 commented May 8, 2019

Kibana version:
master

Describe the bug:
When creating a fresh TSVB visualization, the default index pattern is used.
The first data query is then issued with that default index-pattern against what should be the default date field. I said "should be" because if I'm not currently seeing this behaviour if I'm using the kibana_sample_data_ecommerce that has the order_date as default date field instead of the standard @timestamp.

Steps to reproduce:

  1. set kibana_sample_data_ecommerce as default index pattern
  2. create a new TSVB visualization
  3. you will see a flat green line on the timeseries visualization (check api/metrics/data API call via devtools, the panel object is issuing a that call with the @timestamp wrong date field.
  4. now click on the Panel Option and the visualization will disasppear showing an error message The request for this panel failed
  5. check the last api/metrics/data call, the time_field value is null and ES is complaining about [date_histogram] field doesn't support values of type: VALUE_NULL

Expected behavior:

The default index pattern should use the default time field specified on that patter (that is correctly picked up by the api/metrics/field call but not used on the /data call.

Screenshots (if relevant):
May-08-2019 10-54-56

Any additional context:

First request with wrong time_field:

{
  "timerange": {
    "timezone": "Europe/Rome",
    "min": "2018-05-08T08:49:58.829Z",
    "max": "2019-05-08T08:49:58.830Z"
  },
  "query": [{ "query": "", "language": "kuery" }],
  "filters": [],
  "panels": [
    {
      "id": "61ca57f0-469d-11e7-af02-69e470af7417",
      "type": "timeseries",
      "series": [
        {
          "id": "61ca57f1-469d-11e7-af02-69e470af7417",
          "color": "#68BC00",
          "split_mode": "everything",
          "metrics": [
            { "id": "61ca57f2-469d-11e7-af02-69e470af7417", "type": "count" }
          ],
          "separate_axis": 0,
          "axis_position": "right",
          "formatter": "number",
          "chart_type": "line",
          "line_width": 1,
          "point_size": 1,
          "fill": 0.5,
          "stacked": "none"
        }
      ],
      "time_field": "@timestamp",
      "index_pattern": "",
      "interval": "auto",
      "axis_position": "left",
      "axis_formatter": "number",
      "axis_scale": "normal",
      "show_legend": 1,
      "show_grid": 1,
      "default_index_pattern": "kibana_sample_data_ecommerce"
    }
  ],
  "state": {}
}

subsequent wrong call with null field

{
  "timerange": {
    "timezone": "Europe/Rome",
    "min": "2018-05-08T08:50:09.412Z",
    "max": "2019-05-08T08:50:09.412Z"
  },
  "query": [{ "query": "", "language": "kuery" }],
  "filters": [],
  "panels": [
    {
      "id": "61ca57f0-469d-11e7-af02-69e470af7417",
      "type": "timeseries",
      "series": [
        {
          "id": "61ca57f1-469d-11e7-af02-69e470af7417",
          "color": "#68BC00",
          "split_mode": "everything",
          "metrics": [
            { "id": "61ca57f2-469d-11e7-af02-69e470af7417", "type": "count" }
          ],
          "separate_axis": 0,
          "axis_position": "right",
          "formatter": "number",
          "chart_type": "line",
          "line_width": 1,
          "point_size": 1,
          "fill": 0.5,
          "stacked": "none"
        }
      ],
      "time_field": null,
      "index_pattern": "",
      "interval": "auto",
      "axis_position": "left",
      "axis_formatter": "number",
      "axis_scale": "normal",
      "show_legend": 1,
      "show_grid": 1,
      "default_index_pattern": "kibana_sample_data_ecommerce"
    }
  ],
  "state": {}
}

cc @elastic/kibana-tsvb-external

@markov00 markov00 added bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) regression labels May 8, 2019
alexwizp added a commit to alexwizp/kibana that referenced this issue May 13, 2019
@alexwizp alexwizp self-assigned this May 13, 2019
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) regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants