弹性搜索的 Logstash Mutate Split 不起作用

Elastic search's Logstash Mutate Split is not working

我在 logstash 中拆分字符串类型字段(目标)时遇到问题。

"log" => {
"address"  =>  "0.0.0.1",
"target" => "hello.exe - PID: 3005 - Module: nthdll.dll"
}

我尝试除以“-”,这是我的代码:

mutate {
  copy => { "[log][target]" => "targetList" }
  split => { "targetList" =>  "-" }
}

但它不起作用, “targetList”已复制,但拆分不起作用。

"targetList" => "hello.exe - PID: 3005 - Module: nthdll.dll"

请多多指教

mutate 在fixed order 中进行操作,split 在copy 之前,所以在split 运行时targetList 字段不存在。将它分成两个 mutates

mutate { copy => { "[log][target]" => "targetList" } } 
mutate { split => { "targetList" =>  "-" } }

如果它解决了您的问题,请标记为回答您的问题。