This functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
truncate_fields processor truncates a field to a given size. If the size of the field is smaller than
the limit, the field is left as is.
- List of fields to truncate.
Maximum number of bytes in a field. Mutually exclusive with
Maximum number of characters in a field. Mutually exclusive with
(Optional) If set to true, in case of an error the changes to
the event are reverted, and the original event is returned. If set to
false, processing continues also if an error happens. Default is
(Optional) 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 truncates the field named
message to 5 characters:
processors: - truncate_fields: fields: - message max_characters: 5 fail_on_error: false ignore_missing: true