05 Jun 2024 05:56 PM - last edited on 06 Jun 2024 09:18 AM by MaciejNeumann
I have this simple log:
Solved! Go to Solution.
06 Jun 2024 11:57 AM
you can easily parse json (mocked some of the data):
data record(content="{\"HTTP_REQUEST_URL\": \".....\",\"HTTP_RESPONSE_CODE\": 500,\"HTTP_RESPONSE_BODY\": \"errors\",\"CURRENT_URL\": \"/example\"}"),
record(content="{\"HTTP_REQUEST_URL\": \".....\",\"HTTP_RESPONSE_CODE\": 500,\"HTTP_RESPONSE_BODY\": \"errors\",\"CURRENT_URL\": \"/example\"}"),
record(content="{\"HTTP_REQUEST_URL\": \".....\",\"HTTP_RESPONSE_CODE\": 501,\"HTTP_RESPONSE_BODY\": \"errors\",\"CURRENT_URL\": \"/example\"}")
| parse content, "JSON:http_payload"
| filter http_payload[HTTP_RESPONSE_CODE] >= 400
| summarize count(), by:{http_payload[HTTP_RESPONSE_CODE]}