Copy fields
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Generally available
The copy_fields processor takes the value of a field and copies it to a new field.
You cannot use this processor to replace an existing field. If the target field already exists, you must drop or rename the field before using copy_fields.
fields- List of
fromandtopairs to copy from and to. It’s supported to use@metadata.prefix forfromandtoand copy values not just in/from/to the event fields but also in/from/to the event metadata. 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"
}
}