Logstash Merge Field With Root Object

后端 未结 2 485
滥情空心
滥情空心 2021-01-20 16:09

I have logstash input that looks like this

{
    \"@timestamp\": \"2016-12-20T18:55:11.699Z\",
    \"id\": 1234,
    \"detail\": {
        \"foo\": 1
                


        
2条回答
  •  隐瞒了意图╮
    2021-01-20 16:52

    You can do this with a ruby filter.

    filter { ruby { code => " event['detail'].each {|k, v| event[k] = v } event.remove('detail') " } }

提交回复
热议问题