簡體   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