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

Support converting hex strings to integers #32182

Closed
andrewkroh opened this issue Jul 18, 2018 · 1 comment · Fixed by #32213
Closed

Support converting hex strings to integers #32182

andrewkroh opened this issue Jul 18, 2018 · 1 comment · Fixed by #32213
Assignees
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement

Comments

@andrewkroh
Copy link
Member

I would like to be able to convert hexadecimal numbers that are prefixed with 0x to integers with the Ingest Node convert processor. Sometimes Windows event logs contain hex values that I'd like to convert to numbers (such as the TargetProcessId in 4690).

For example, this pipeline results in a java.lang.IllegalArgumentException: unable to convert [0x01] to integer.

POST _ingest/pipeline/_simulate
{
  "pipeline": {
    "processors": [
      {
        "convert": {
          "field": "hex",
          "type": "integer"
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "hex": "0x01"
      }
    }
  ]
}
@andrewkroh andrewkroh added >enhancement :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP labels Jul 18, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@talevy talevy added the help wanted adoptme label Jul 19, 2018
rjernst added a commit to rjernst/elasticsearch that referenced this issue Jul 19, 2018
This commit adds checks for hex formatted strings in the convert
processor, allowing strings like `0x1` to be parsed as integer `1`.

closes elastic#32182
@jasontedor jasontedor removed the help wanted adoptme label Jul 20, 2018
rjernst added a commit that referenced this issue Jul 24, 2018
This commit adds checks for hex formatted strings in the convert
processor, allowing strings like `0x1` to be parsed as integer `1`.

closes #32182
rjernst added a commit that referenced this issue Jul 25, 2018
This commit adds checks for hex formatted strings in the convert
processor, allowing strings like `0x1` to be parsed as integer `1`.

closes #32182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants