找到问题的解决办法了么?

logstah修改日志日期格式为毫秒报错 [0] "_rubyexception"

Logstash | 作者 gaven | 发布于2020年08月27日 | 阅读数:1748

filter {
json {
source => "message"
remove_field => ["message"]
remove_field => ["@version"]
remove_field => ["path"]
remove_field => ["@timestamp"]
add_field => { "proCode" => "10" }
}
ruby {
code => "responseReceivedTime = event.get('responseReceivedTime')
localtimeStr = responseReceivedTime.strftime('%s')
event.set(responseReceivedTime, 'localtimeStr')"
}
}
已邀请:

要回复问题请先登录注册