Hi all,
I'm using a structured logging package (GitHub - sirupsen/logrus: Structured, pluggable logging for Go.) and then shipping with Filebeat directly to our ES cluster. Unfortunately, I'm losing queryability on the fields I'm exposing since the entire log message gets wrapped in Filebeat's exported "message" field. Can someone point me in the right direction of being able to export these fields to be top-level?
For example, in I'm logging:
log.WithFields(log.Fields{
"event": "click",
"topic": "video",
"key": "123",
}).Fatal("Failed to send event")
But on Kibana, we're reading in log records as such that have a field called 'message' which wraps up the logrus payload:
But once this is propagated to Kibana, that log record is wrapped up:
{"source": "/var/log/app.log",
message: "{"event":"click","topic":"video", "key"="123", "level"="fatal", "msg":"Failed to send event","time":"2015-08-12T18:47:07Z"}"
}
Is it possible to push fields such as 'key', 'event', and 'topic' to be top level so I can query?