IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Copy fields
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Copy fields
editThe copy_fields processor copies a field to another one.
-
fields -
List of
fromandtopairs to copy from and to. -
fail_on_error -
(Optional) If set to
trueand an error occurs, the changes are reverted and the original is returned. If set tofalse, processing continues if an error occurs. Default istrue. -
ignore_missing -
(Optional) Indicates whether to ignore events that lack the source
field. The default is
false, which will fail processing of an event if a field is missing.
For example, this configuration:
processors:
- copy_fields:
fields:
- from: message
to: event.original
fail_on_error: false
ignore_missing: true
Copies the original message field to event.original:
{
"message": "my-interesting-message",
"event": {
"original": "my-interesting-message"
}
}