简体   繁体   English

如何生成涉及多个指标的AWS CloudWatch警报

[英]How to generate AWS CloudWatch Alarm which involves multiple Metrics

Need to generate CloudWatch Alarm for API Gateway and Lambda functions. 需要为API网关和Lambda函数生成CloudWatch Alarm。

For API Gateway CloudWatch Alarm should be generated if 5XX Error count is 10% of total request count at given period (eg 5 minutes). 对于API网关,如果5XX错误计数在给定时间段(例如5分钟)内占请求总数的10%,则应生成CloudWatch警报。

Similarly, We need to add a metric if Maximum Latency 6% of total request count > 4 seconds. 同样,如果总请求计数的6%的最大延迟> 4秒,我们需要添加一个指标。

For such type of metric looks like we need a combination of metric like Sum of total requests and than need to calculate percentage of errors. 对于这种类型的度量,看起来我们需要诸如总请求总数之类的度量组合,而不是需要计算错误百分比。

We have Math Expressions/Metric math which might be used. 我们有可能使用的数学表达式/公制数学。 Is there any other way to achieve this? 还有其他方法可以做到这一点吗?

Any help is appreciated! 任何帮助表示赞赏!

EDIT: Its now possible to create alarms on Metric expressions from the CloudWatch Console. 编辑:现在可以从CloudWatch控制台在Metric表达式上创建警报。

Original Answer below: 原始答案如下:

Unfortunately its not possible to create alarms based on Metric expressions in CloudWatch. 不幸的是,无法基于CloudWatch中的Metric表达式创建警报。 Your best bet may be the M of N thresholds in alarms, for example: If num_of_errors > 5 for 3 datapoints in 5 minutes. 最好的选择是警报中的N个阈值中的M个,例如:如果num_of_errors> 5表示5分钟内3个数据点。 Its not exactly what your asking for, but may be a good start. 它不完全是您的要求,但可能是一个好的开始。 Best of luck! 祝你好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何找出谁创建了AWS CloudWatch警报/指标? - How to find out who created aws cloudwatch alarm/metrics? 没有为SQS指标“ NumberOfMessagesReceived”触发AWS CloudWatch警报 - AWS CloudWatch Alarm not triggered for SQS Metrics “NumberOfMessagesReceived” 适用于CloudWatch警报的AWS CloudFormation模板:如何通过ElasticSearch节点而不是整个ElasticSearch集群使用指标来描述警报 - AWS CloudFormation template for CloudWatch alarm: how to describe the alarm with metrics by ElasticSearch node, not by whole ElasticSearch cluster 如何使用 terraform 定义具有多个操作的 aws_cloudwatch_metric_alarm? - How to define aws_cloudwatch_metric_alarm with multiple actions with terraform? 如何禁用 AWS Cloudwatch 指标 - How to disable AWS Cloudwatch metrics AWS CloudWatch 指标:如何计算网络指标? - AWS CloudWatch metrics: How are Network metrics calculated? 从AWS Cloudwatch查询多个实例的指标 - Query metrics for multiple instances from AWS Cloudwatch 如何使用cloudformation模板传递aws-lambda函数名称以生成cloudwatch警报 - How to pass aws-lambda function name to generate a cloudwatch alarm using cloudformation template AWS Cloudwatch 警报问题 - AWS Cloudwatch Alarm Issue Terraform AWS Cloudwatch 警报 - Terraform AWS Cloudwatch alarm
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM