Skip to content

Support converting hex strings to integers #32182

Closed
@andrewkroh

Description

@andrewkroh

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"
      }
    }
  ]
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions