Map Fields Processor

Description

This processor enables you to move or copy fields within an event, including nested fields.

Use

You would typically use this processor for transformation of the data within an event, such as moving a nested field to the top level.

Configuration

Specify the source and target fields where you want to move data.

The default behavior is to copy the data to the specified target field from the source, and not overwrite the target field if it exists. If you want to remove the original field, set Drop Source as true.If you want to update an already-existing target field, set Overwrite target to true.

OptionDescriptionExample
Source FieldThe parsed data field from where the data to move originates..data.host
Target FieldThe field you want to move the data to..hostname
Drop SourceWhether you want to remove the original field, or leave it as is (default is to leave as it is).True
Overwrite TargetWhether you want to override the target data if the field exists, or skip the map operation (default is to not overwrite)True

Examples

Restructuring

The initial log message from a database included timestamp and attribute information in nested objects. Additionally the timestamp field was not in a standard format.

Before

JSON
Copy

Options

In this case you will shift the level of the date and move the address up a level, while also renaming the date field. You will specify to drop the originating value. You could optionally select to overwrite the destination if it exists, but it will not make a difference in this case.

OptionValue
Move and remove the original value.t.$date to .timestamp
Move and remove the original value.attr.address to .address

After

Note that the originating objects still exist in the message. In this case, you would want to clean them up with a Remove Fields Processor following the Move.

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated