16
votes

I have a cloudwatch alarm configured :

Threshold : "GreaterThan 0" for 1 consecutive period,

Period : 1 minute,

Statistic : Sum

The alarm is configured on top of AWS SQS NumberOfMessagesSent. The queue was empty and no messages were being published to it. I sent a message manually. I could see the spike in metric but state of alarm was still OK. I am a bit confused why this alarm is not changing its state even though all the conditions to trigger this are met.

2
do you have an action associated with the alarm? When did you look? the way this works is that it will go to ALARM and go back to OK in the next minute. So if you looked at the wrong time, or caught end of minute for reporting, it's possible that you did not observe it (but it happened)Mircea
I had attached an action for each of the state- ALARM, OK, INSUFFICIENT-STATE. The action was to send out email, but I did not receive any email either.Juhi Kulshreshtha
@JuhiKulshreshtha - Facing the same problem. Did you figure out the solution? If yes, please share the same.Ankur Piyush

2 Answers

12
votes

I just overcame this problem with the help of AWS support. You need to set the period on your alarm to ~15 minutes. It's got to do with how SQS marks the event's timestamps as it pushes them to CloudWatch.

Don't worry, as setting the period to a greater number will not affect how quickly you are alerted of an alarm. It will still get data from SQS every 5 minutes.

-1
votes

It could be that the interval time is set to less than 300 seconds. The free CloudWatch checks every 5 minutes so if you set an alarm for less than that it you will sometimes get INSUFFICIENT_DATA.