计算aws cloudwatch指标中的唯一值

2024-02-12

我有一组 json 格式的 cloudwatch 日志,其中包含用户名字段。如何编写一个 Cloudwatch 指标查询来计算每月唯一用户数?


现在您可以使用以下方法计算唯一字段值count_distinctCloudWatch Insights 查询中的指令。

Example:

fields userId, @timestamp
| stats count_distinct(userId)

有关 CloudWatch Insights 的更多信息:https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

计算aws cloudwatch指标中的唯一值 的相关文章

随机推荐