Created
November 7, 2016 19:30
-
-
Save inqueue/550e98c9e1e680d01eae0e8e408bc495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
stdin { | |
codec => json {} | |
} | |
} | |
filter { | |
clone { | |
clones => ['cloned_test_event'] | |
} | |
if ([type] == 'cloned_test_event') { | |
mutate { | |
remove_field => ["title"] | |
} | |
} | |
} | |
output { | |
stdout { codec => rubydebug { metadata => true } } | |
} |
Author
inqueue
commented
Nov 7, 2016
$ cat clone.conf && echo '{"name": "a test","title": "some title"}' | bin/logstash -f clone.conf
input {
stdin {
codec => json {}
}
}
filter {
clone {
clones => ['cloned_test_event', 'second_clone']
}
if ([type] == 'cloned_test_event') {
mutate {
remove_field => ["title"]
}
}
}
output {
stdout { codec => rubydebug { metadata => true } }
}
Settings: Default pipeline workers: 4
Pipeline main started
{
"name" => "a test",
"title" => "some title",
"@version" => "1",
"@timestamp" => "2016-11-07T19:39:34.101Z",
"host" => "peanut.local"
}
{
"name" => "a test",
"@version" => "1",
"@timestamp" => "2016-11-07T19:39:34.101Z",
"host" => "peanut.local",
"type" => "cloned_test_event"
}
{
"name" => "a test",
"title" => "some title",
"@version" => "1",
"@timestamp" => "2016-11-07T19:39:34.101Z",
"host" => "peanut.local",
"type" => "second_clone"
}
Pipeline main has been shutdown
stopping pipeline {:id=>"main"}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment