我想将记录的事件可视化为聚合日志文件:作为表格。
我的testdata是由示例Java应用程序使用net.logstash.logback.appender.LogstashSocketAppender
(Logback JSON appender)和http_poller
创建的,用于轮询Spring执行器。
作为我的第一步,我想想象一下按时间排序的logback消息。我去发现并添加了消息,但遗憾的是结果看起来像这样:
如您所见,实际包含消息的第一行显示{"@timestamp":"2016-04-15T15:28:00.104+02:00","@version":1,"message":"accounts-service byOwner() found: []","logger_name":"io.pivotal.microservices.accounts.AccountsController","thread_name":"main","level":"INFO","level_value":20000,"HOSTNAME":"ham00705"}
如何才能显示消息的内容,在这种情况下为"accounts-service byOwner() found: []","logger_name":"io.pivotal.microservices.accounts.AccountsController"
?
和如何在没有消息的情况下隐藏事件?
示例消息如下:
{
"_index": "logstash-2016.04.15",
"_type": "logs",
"_id": "AVQaK4Ng7SD5aGZ_l8Xy",
"_score": null,
"_source": {
"message": "{\"@timestamp\":\"2016-04-15T15:28:00.104+02:00\",\"@version\":1,\"message\":\"accounts-service byOwner() found: []\",\"logger_name\":\"io.pivotal.microservices.accounts.AccountsController\",\"thread_name\":\"main\",\"level\":\"INFO\",\"level_value\":20000,\"HOSTNAME\":\"ham00705\"}\r",
"@version": "1",
"@timestamp": "2016-04-15T13:45:37.085Z",
"path": "D:\\Coden\\Projects\\Git\\microservice-logging\\logstash2\\test-data\\app-min.log.json",
"host": "ham00705"
},
"fields": {
"@timestamp": [
1460727937085
]
},
"sort": [
1460727937085
]
}