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

Clarify extractor compatibility #1831

Closed
edmundoa opened this Issue Feb 17, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@edmundoa
Member

edmundoa commented Feb 17, 2016

From the mailing list, there is a report of a change in the extractors structure. Extractors exported from versions pre 2.0, had an extractor_type field, whereas in 2.0 that field is called type.

We should verify that we support old extractors or clarify that in the documentation, probably even notify plugin creators.

@edmundoa edmundoa added this to the 2.0.0 milestone Feb 17, 2016

@the-Pretender

This comment has been minimized.

the-Pretender commented Feb 18, 2016

Well, maybe it should, but it doesn't. Exporting a newly created split and index extractor on graylog 2.0.0 alpha 2 yields the following:

{
  "extractors": [
    {
      "id": "019c12f0-d633-11e5-b850-005056b58d98",
      "title": "cef_version",
      **"type": "split_and_index",**
      "converters": [],
      "order": 0,
      "exceptions": 0,
      "metrics": {
        "total": {
          "time": {
            "min": 90,
            "max": 330,
            "mean": 189,
            "std_dev": 76,
            "95th_percentile": 330,
            "98th_percentile": 330,
            "99th_percentile": 330
          },
          "rate": {
            "total": 6,
            "mean": 1.1225790991670823,
            "one_minute": 1.2,
            "five_minute": 1.2,
            "fifteen_minute": 1.2
          },
          "duration_unit": "microseconds",
          "rate_unit": "events/second"
        },
        "converters": {
          "time": {
            "min": 1,
            "max": 2,
            "mean": 2,
            "std_dev": 0,
            "95th_percentile": 2,
            "98th_percentile": 2,
            "99th_percentile": 2
          },
          "rate": {
            "total": 6,
            "mean": 1.1225890412654602,
            "one_minute": 1.2,
            "five_minute": 1.2,
            "fifteen_minute": 1.2
          },
          "duration_unit": "microseconds",
          "rate_unit": "events/second"
        }
      },
      "cursor_strategy": "copy",
      "source_field": "message",
      "target_field": "cef_version",
      "extractor_config": {
        "index": 1,
        "split_by": "|"
      },
      "creator_user_id": "admin",
      "condition_type": "none",
      "condition_value": "",
      "converter_exceptions": 0
    }
  ],
  "version": "2.0.0-SNAPSHOT"
}

The same extractor in 1.3.2:

{
  "extractors": [
    {
      "condition_type": "none",
      "condition_value": "",
      "converters": [],
      "cursor_strategy": "copy",
      "extractor_config": {
        "index": 1,
        "split_by": "|"
      },
     ** "extractor_type": "split_and_index",**
      "order": 0,
      "source_field": "message",
      "target_field": "cef_version",
      "title": "cef_version"
    }
  ],
   "version": "1.3.2 (e7c49b6)"
}

In order to be able to import the latter to graylog 2.0.0 alpha 2, extractor_type has to be changed to type, or the following error is thrown in console:

Instantiation of [simple type, class org.graylog2.rest.models.system.inputs.extractors.requests.CreateExtractorRequest] value failed: Null extractorType

@kroepke kroepke added bug S2 P1 labels Feb 19, 2016

bernd added a commit that referenced this issue Mar 16, 2016

Fix import of Graylog 1.x extractors and fix export format
The import/export format wrangling should be done on the server side
instead of doing all of this in the browser.

This is a minimal fix because refactoring this is too much at the
moment.

Fixes #1831

bernd added a commit that referenced this issue Mar 16, 2016

Fix import of Graylog 1.x extractors and fix export format
The import/export format wrangling should be done on the server side
instead of doing all of this in the browser.

This is a minimal fix because refactoring this is too much at the
moment.

Fixes #1831

@kroepke kroepke added the triaged label Sep 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment