I am using dissect to parse a field it has just parsed out of a message.
input { generator { message => 'aaa bbb/ccc ddd' count => 1 } }
output { stdout { codec => rubydebug } }
filter {
dissect {
mapping => {
"message" => '%{a} %{bAndC} %{d}'
"bAndC" => '%{b}/%{c}'
}
}
}
That gets this, which looks good. However I do not need the combined bAndC field
"bAndC" => "bbb/ccc",
"a" => "aaa",
"b" => "bbb",
"d" => "ddd",
"c" => "ccc"
So I tried this
input { generator { message => 'aaa bbb/ccc ddd' count => 1 } }
output { stdout { codec => rubydebug } }
filter {
dissect {
mapping => {
"message" => '%{a} %{bAndC} %{d}'
"bAndC" => '%{b}/%{c}'
}
remove_field => [ "bAndC" ]
}
}
Which gets me this. Is that a bug or a feature?
"a" => "aaa",
"d" => "ddd",
( "%{a} %{b}/%{c} %{d}" is not a solution to my problem )