Create Metric Math alarm using single metric in cloudwatch

463 views Asked by At

I am trying to create alarm in cloudwatch. I have a metric where I emit 1.0 for success and 0.0 for failure. The SUM statistic is supposed to me give all the successful request while SAMPLE COUNT should give all the requests(including failed one). I want to create an alarm where if SUM(metric)/SAMPLE COUNT(metric) <= threshold it alarms. I am not able to do the same using a single metric. The SAMPLE COUNT option does not show up. Am I expected to create two metrics in order to achieve this in cloudwatch if it is not possible via single metric?

1

There are 1 answers

0
Dejan Peretin On

SUM(metric)/SAMPLE COUNT(metric) is the definition of average. Can you use the Average statistic?