Skip to content

Instantly share code, notes, and snippets.

@teebu
Created March 12, 2016 00:59
Show Gist options
  • Save teebu/ed4e1c6539dde4c8ca83 to your computer and use it in GitHub Desktop.
Save teebu/ed4e1c6539dde4c8ca83 to your computer and use it in GitHub Desktop.
testing cloning
input {
stdin {
type => "typeA"
}
}
filter {
if [type] == "typeA" {
ruby {
code => "
clone = event.clone
clone['type'] = 'typeB'
"
}
}
}
output {
if [type] == "typeA" {
stdout {codec => rubydebug }
}
if [type] == "typeB" {
stdout {codec => rubydebug }
}
if [type] == "typeC" {
stdout {codec => rubydebug }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment