I want to parse logs in the following format. But what confuses me is that i have to specify fields for the decode_json_fields processor under which to find json strings. But what if there is no outer field for the json? How would the following log to be parsed?
{
"deploymentid": "3ae9ef41-ce1b-435a-abc9-4b441a4914bd",
"level": "ERROR",
"time": "2019-03-21T22:14:31.475878214Z",
"api": {
"name": "PutObject",
"args": {
"bucket": "test",
"object": "issue"
}
},
"remotehost": "127.0.0.1",
"requestID": "158E190E7B258FDB",
"userAgent": "Minio (linux; amd64) minio-go/v6.0.20 mc/2019-03-15T20:48:52Z",
"error": {
"message": "read tcp 172.16.1.105:9000->172.16.1.103:44678: read: connection reset by peer",
"source": [
"cmd/object-handlers.go:1073:cmd.objectAPIHandlers.PutObjectHandler()",
"cmd/api-router.go:79:cmd.objectAPIHandlers.PutObjectHandler-fm()",
"net/http/server.go:1964:http.HandlerFunc.ServeHTTP()"
],
"variables": {
"peerAddress": "127.0.0.1:9000"
}
}
}