Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 570 Bytes

mutate_replace.md

File metadata and controls

27 lines (20 loc) · 570 Bytes

Mutate replace filter

Status : core plugin, unit tested and maintained.

The mutate replace filter is used to run regex on specified field.

Example 1: replace all . in toto field by -

Config using url: filter://mutate_replace://toto?from=\\.&to=-

Config using logstash format:

filter {
  mutate_replace {
    field => toto
    from => /\./
    to => -
  }
}

Parameters:

  • field: which field to work on.
  • from: regex to find pattern which will be replaced. You have to escape special characters.
  • to: replacement string.