AWS 云观察:我们可以在云观察查询中使用两次统计信息吗?

问题描述 投票:0回答:0

我正在处理一个仪表板查询,我想在其中计算所有花费超过一定数量才能完成的交易。

我的查询是这样的:

fields message
| filter kubernetes.namespace_name = 'feature-7355' 
| filter message like "INFO"
| filter message like "Metric" 
| parse '[*] * [*] * - *' as logLevel, timeStp, threadName, classInfo, logMessage
| parse logMessage 'Header: [*]. Metric: [*]. TimeSpent: [*]. correlationId: [*]' as headers, metric, timeSpent, correlationId
| filter ispresent(correlationId)
| stats sum(timeSpent) as TotalTimeSpentByTransaction by correlationId
| filter TotalTimeSpentByTransaction > 2000
| stats count(timeCorrelationId) as correlationIdCount

当我尝试执行此操作时出现错误:

mismatched input 'stats' expecting {K_PARSE, K_SEARCH, K_FIELDS, K_DISPLAY, K_FILTER, K_SORT, K_ORDER, K_HEAD, K_LIMIT, K_TAIL}

有没有办法解决这个问题,有人可以帮我解决这个问题吗?

amazon-cloudwatch
© www.soinside.com 2019 - 2024. All rights reserved.