CloudWatch not honoring alarm settings

amazon ec2amazon-cloudwatchamazon-web-services

I have a CPUUtilization alarm setup for my ec2 instance. The settings for the alarm are:

CPUUtilization >= 95% for 15 consecutive periods of 1 minute (15mins total)

We are still receiving alert emails even though the instance does not appear to enter the defined alarm state.

The email alarm my team and I are receiving explains:

You are receiving this email because your Amazon CloudWatch Alarm … has entered the ALARM state, because "Threshold Crossed: 3 datapoints were greater than or equal to the threshold (95.0). The most recent datapoints: [99.466, 98.45]…

3 datapoints? It is my understanding that my setting of 15 consecutive periods of 1 minute should only alert if 15 datapoints were greater than 95%.

Am I misunderstanding the text of the email? Are my alarm settings conflicting with something?

Best Answer

Your EC2 instance must be enabled for monitoring at 1-minute intervals. If you have not enabled detailed monitoring on your EC2 instance, then you would be collecting data in 5-minute intervals. 3 consecutive periods of 5-minute intervals would be 15 minutes.

I'm not certain, but after reviewing some of my own Cloudwatch alarms and playing with a new one in the console... it seems like, in this case, the alarm state triggers based on minutes instead of periods -- we just define minutes in terms of periods at alarm creation time. This seems sensible to me -- otherwise your alarm wouldn't ever be able to enter the alarm state if detailed (1-minute) monitoring was disabled.

Regarding detailed monitoring: I would turn it on for this case, if it is disabled. If you are using basic (5-minute) monitoring, the 3 data points don't necessarily mean that CPU Utilization has been >= 95% for 15 consecutive minutes. It rather means that CPU Utilization was >= 95% at the time the data was sampled, for 3 consecutive samplings.

Related Topic