Cloudwatch Log Insights sum-by query returning differing results each run

0

I am trying to write a log insights query for a dashboard that can aggregate the number of times a given message id has failed. A slightly simplified query that produces similar behavior is as follows:

fields @timestamp, @message
| filter message.body = 'message failed' or message.body = 'message succeeded'
| stats sum(message.body = 'message failed') as failedRequests by message.id
| filter failedRequests > 0

To see which message ids have failed repeatedly and which only failed a few times before using all retries. However when running this query today I know 14 failures happened within the time being searched, but this query has returned between 0 and 4 them, and rerunning the query causes it to count a different subset of the failed messages. Is this expected behavior?

已提問 2 年前檢視次數 150 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南