JSON模式 本文主要介绍结构化解析JSON模式。 概述 支持解析Object类型的JSON日志,提取JSON日志内容作为KeyValue键值对,即Object首层的键作为Key,Object首层的值作为Value。 示例 如您需要采集的原始数据为: 原始日志: plaintext {"timelocal":"22/Jan/2019:19:19:34 +0800","bodysent":23,"responsetime":0.232,"upstreamtime":"0.232","httphost":"127.0.0.1","method":"POST","request":"POST","xff":"","referer":" (Windows NT 10.0; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0","responsecode":"200"} 经过结构化处理后,采集到云日志服务后的日志如下: plaintext agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0 bodysent: 23 httphost: 127.0.0.1 method: POST referer: request: POST responsecode: 200 responsetime: 0.232 timelocal: 12/Jan/2023:21:33:18 +0800 upstreamtime: 0.232 xff: message: {"timelocal":"22/Jan/2019:19:19:34 +0800","bodysent":23,"responsetime":0.232,"upstreamtime":"0.232","httphost":"127.0.0.1","method":"POST","request":"POST","xff":"","referer":" (Windows NT 10.0; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0","responsecode":"200"} 配置说明 在日志接入流程中创建采集配置步骤中,切割模式选择JSON模式即可。