Skip to content

Instantly share code, notes, and snippets.

@piavlo
Created January 19, 2013 21:10
Show Gist options
  • Select an option

  • Save piavlo/4575152 to your computer and use it in GitHub Desktop.

Select an option

Save piavlo/4575152 to your computer and use it in GitHub Desktop.
pruning empty fields from a message
input {
generator {
type => "stdin"
lines => [ "this is an %{empty.match} in a string" ]
count => 1
}
}
filter {
mutate {
type => "stdin"
gsub => [ "@message", "%{[^}]*}", "" ]
}
}
output {
stdout {
debug => true
debug_format => "json"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment