AWS CloudWatch - 日志见解 - 搜索查询

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

我想可视化我感兴趣的三种类型的错误。我创建了三个字段来对这些错误进行分组,但现在我看不到如何在图表上将它们可视化。我试过了...

filter @logStream and @message ~= /errorType/
| fields @message ~= /errorType1/ as errorType1, @message ~= /errorType2/ as errorType2, @message ~= /errorType3/ as errorType3
| stats count(*) by bin(1m)

然后我单击“可视化”选项卡,但没有获得包含三个字段的字符。

我尝试了很多选项,但它给了我语法错误。

amazon-web-services logging amazon-cloudwatch
1个回答
0
投票

我现在明白了,统计线需要是...

| stats count(*) by errorType1, errorType2, errorType3
© www.soinside.com 2019 - 2024. All rights reserved.