此文基于 Granfana+Loki+Vector +Kafka 筛选过滤 指定字段
-
添加Query
在Granfana 中配置 Data Source ->Loki --> Add
# 1. 在Granfana 中添加loki 过滤条件
# 2. 过滤 ruleID,rcSysId,logDate,logTime,securityExchange,threshold,stockName 等字段值
{key="mag0506"}|= ""|json| line_format "{
{.message}}" | json mapList1="mapList[1]",ruleID="mapList[1][\"64101\"]",rcSysId="mapList[1][\"66002\"]",logDate="mapList[1][\"28000\"]",logTime="mapList[1][\"28001\"]",securityExchange="mapList[1][\"1301\"]",threshold="mapList[1][\"43220\"]",stockName="mapList[1][\"11001\"]",securityId="mapList[1][\"48\"]",orderId="mapList[1][\"37\"]",orderBs="mapList[1][\"93020\"]",tradeSysId="mapList[1][\"66003\"]&