How to generate AWS CloudWatch Alarm which involves multiple Metrics

青春壹個敷衍的年華 提交于 2019-12-11 01:57:54

问题


Need to generate CloudWatch Alarm for API Gateway and Lambda functions.

For API Gateway CloudWatch Alarm should be generated if 5XX Error count is 10% of total request count at given period (e.g. 5 minutes).

Similarly, We need to add a metric if Maximum Latency 6% of total request count > 4 seconds.

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!


回答1:


EDIT: Its now possible to create alarms on Metric expressions from the CloudWatch Console.

Original Answer below:

Unfortunately its not possible to create alarms based on Metric expressions in CloudWatch. 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. Its not exactly what your asking for, but may be a good start. Best of luck!



来源:https://stackoverflow.com/questions/50233343/how-to-generate-aws-cloudwatch-alarm-which-involves-multiple-metrics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!