繁体   English   中英

以下日志的 AWS cloudwatch 洞察查询组合

[英]AWS cloudwatch insight query composition for the following log

尝试编写将提取以下字段的洞察查询。

apiname、端点、响应代码、状态

来自日志: "{\n \"apiName\": \"test_Authentication\",\n \"endpoint\": \"https://test.cloud.com\",\n \"responseCode\": 200,\n \"status\": \"Healthy\",\n}

截至目前,我得到空字段:

在此处输入图像描述

我尝试使用查询中的解析消息,它给出了我正在寻找的结果。

| parse @message '"apiName\":*,' as apiName
| parse @message '"endpoint\":*,' as endpoint
| parse @message '"responseCode\":*,' as responseCode
| parse @message '"status\":*,' as status
| sort @timestamp desc
| limit 20

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM