gpt4 book ai didi

amazon-cloudwatch - 结合两个 Cloudwatch 洞察查询

转载 作者:行者123 更新时间:2023-12-03 14:44:56 26 4
gpt4 key购买 nike

我有两个 Cloudwatch 见解查询,我希望能够并行运行并比较两者的结果。

stats count(*) as requestIdCount by @requestId 
| filter @message like /START RequestId/
| filter requestIdCount > 1
stats count(*) as requestIdCount by @requestId 
| filter @message like /END RequestId/
| filter requestIdCount > 1

能够做到这一点会很棒
fields (
stats count(*) as requestIdCount by @requestId
| filter @message like /END RequestId/
| filter requestIdCount > 1) as EndRequestCount,
(
stats count(*) as requestIdCount by @requestId
| filter @message like /START RequestId/
| filter requestIdCount > 1) as StartRequestCount

但是我现在看不到任何方法可以在见解中进行子查询。有没有一种方法可以组合这样的查询?

最佳答案

尝试这个:

parse @message 'START RequestId' as @startRequestId
| parse @message 'END RequestId' as @endRequestId
| stats count(@startRequestId) as startRequestIdCount , count(@endRequestId) as endRequestIdCount by bin(5m)
| filter startRequestIdCount > 1
| filter endRequestIdCount > 1
CloudWatch Logs Insights Query Syntax

关于amazon-cloudwatch - 结合两个 Cloudwatch 洞察查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58847700/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com