我正在使用 AWS Cloudwatch Insights 并运行如下查询:
fields @message, @timestamp
| filter strcontains(@message, "Something of interest happened")
| stats count() as interestCount by bin(10m) as tenMinuteTime
| stats max(interestCount) by datefloor(tenMinuteTime, 1d)
但是,在最后一行,我收到以下错误:
mismatched input 'stats' expecting {K_PARSE, K_SEARCH, K_FIELDS, K_DISPLAY, K_FILTER, K_SORT, K_ORDER, K_HEAD, K_LIMIT, K_TAIL}
这似乎意味着我无法在 Insights 中进行多层统计查询,因此无法对统计数据进行统计。有没有解决的办法?