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

[Rollup] incorrect check on histo group field type #32035

Closed
kaem2111 opened this issue Jul 13, 2018 · 3 comments
Closed

[Rollup] incorrect check on histo group field type #32035

kaem2111 opened this issue Jul 13, 2018 · 3 comments
Assignees
Labels
:StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data

Comments

@kaem2111
Copy link

Elasticsearch version: 6.3.1

Description of the problem including expected versus actual behavior:

{
  "error": {
    "root_cause": [
      {
        "type": "remote_transport_exception",
        "reason": "[XXXX][XXXX:9300][cluster:admin/xpack/rollup/put]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Validation Failed: 1: The field referenced by a histo group must be a [numeric] type, but found [scaled_float] for field [system.cpu.idle.pct];"
  },
  "status": 400
}

I expect scaled_float is a numeric type and the check for allowed types has to be adjusted/extended

Steps to reproduce:

at console exec:

PUT _xpack/rollup/job/metricbeat_test
{
  "index_pattern": "metricbeat-*",
  "rollup_index": "metricbeat_1h",
  "cron": "12 * * * * ?",
  "page_size": 1000,
  "groups": {
    "date_histogram": {
      "field": "@timestamp",
      "interval": "1h",
      "delay": "3h"
    },
    "terms": {
      "fields": [
        "host.name",
        "metricset.module",
        "metricset.name"
      ]
    },
    "histogram": {
      "fields": [
        "system.cpu.idle.pct"
      ],
      "interval": 12
    }
  },
  "metrics": [
    {
      "field": "system.cpu.total.pct",
      "metrics": [
        "max"
      ]
    }
  ]
}

Provide logs (if relevant):

@colings86 colings86 added the :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data label Jul 13, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@colings86
Copy link
Contributor

@polyfractal could you take a look?

@polyfractal
Copy link
Contributor

@kaem2111 ah sorry about that, it is indeed a bug! This was fixed for metrics in 2d6d3c3, but I didn't think about the histogram at the time. Histo should definitely support scaled_floats.

Will get a bugfix up soon! Thanks for the report.

polyfractal added a commit to polyfractal/elasticsearch that referenced this issue Jul 13, 2018
Metric config already whitelist scaled_floats, but it wasn't added to
the histo group config.  This centralizes the mapping types map
so that both metrics and histo (and any future configs) use the same
map.

Fixes elastic#32035
polyfractal added a commit that referenced this issue Jul 13, 2018
Metric config already whitelist scaled_floats, but it wasn't added to
the histo group config.  This centralizes the mapping types map
so that both metrics and histo (and any future configs) use the same
map.

Fixes #32035
polyfractal added a commit that referenced this issue Jul 13, 2018
Metric config already whitelist scaled_floats, but it wasn't added to
the histo group config.  This centralizes the mapping types map
so that both metrics and histo (and any future configs) use the same
map.

Fixes #32035
polyfractal added a commit that referenced this issue Jul 13, 2018
Metric config already whitelist scaled_floats, but it wasn't added to
the histo group config.  This centralizes the mapping types map
so that both metrics and histo (and any future configs) use the same
map.

Fixes #32035
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data
Projects
None yet
Development

No branches or pull requests

4 participants