我正在对我的m子应用程序可用的弹性搜索日志中创建grafana仪表板 检查任何api中的错误详细信息。我面临的问题是所有带有错误详细信息的有效负载 在message元素中填充为字符串。谁能以任何方式帮助我提取 错误代码和错误消息从此日志并显示在grafana中? 这是我的弹性搜索文档:我想提取错误代码:带有正则表达式的错误请求
{
"_index": "local.logevent.balance-v1",
"_type": "_doc",
"_id": "kymRP20Bp8CiWs3OefJO",
"_version": 1,
"_score": null,
"_source": {
"timeMillis": 1568729560968,
"thread": "[balance-api-09].httpListenerConfig.worker.01",
"level": "ERROR",
"loggerName": "org.mule.api.processor.LoggerMessageProcessor",
"message": "Transaction [null] - Error Code [BAD_REQUEST] - Error Message [] - Error Description
[]",
"endOfBatch": false,
"loggerFqcn": "org.apache.commons.logging.impl.SLF4JLocationAwareLog",
"contextMap": {},
"threadId": 20,
"threadPriority": 5
},
"fields": {
"timeMillis": [
"2019-09-17T14:12:40.968Z"
]
},
"highlight": {
"level": [
"@kibana-highlighted-field@ERROR@/kibana-highlighted-field@"
]
},
"sort": [
1568729560968
]
}
答案 0 :(得分:0)