Reputation: 5237
Is there a way to alarm in cloudwatch when there is no message in SQS for a hour? I tried setting the following alarm:
Metric Name: NumberOfMessagesSent <= 0 for 60 datapoints within 1 hour
Statistic:SampleCount
Period:1 minute
However after 1 hour of no messages, it goes into the insufficient data alarm state. What am I doing wrong here?
Upvotes: 0
Views: 1304
Reputation: 269081
Amazon SQS does not send metrics to Amazon CloudWatch if the queue empty.
Therefore, you should set your alarm to trigger when the state is INSUFFICIENT_DATA. This will effectively be the same as testing for an empty queue.
Upvotes: 1