Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Alarm stuck in INSUFFICIENT_DATA while creating

I tried to create a AWS Alarm to watch the SQS. If the queue has more than 1 message for 2 minutes, I want to create an alarm to trigger a policy. I used this command to create the alarm:

aws cloudwatch put-metric-alarm --alarm-name alarmName --metric-name ApproximateNumberOfMessagesVisible --namespace "AWS/SQS" --statistic Average --period 60  --evaluation-periods 2 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --dimensions "Name=QueueName,Value=QueueName" "Name=AutoScalingGroupName,Value=asg-name" --alarm-actions "<arn:batch-upscale-policy>" --actions-enable

I can see the alarm in the AWS console, but it's stuck in the INSUFFICIENT_DATA state. How can I fix it?

Here I'm to listen to queues in other AWS Account. Is it possible??!

like image 464
user1748253 Avatar asked Nov 04 '13 05:11

user1748253


People also ask

Why is my CloudWatch alarm in INSUFFICIENT_DATA state?

Because the data points are not successfully being delivered to CloudWatch, the alarm can't retrieve any data points for those evaluation periods. This triggers an INSUFFICIENT_DATA state. After recovering connectivity, the application sends the backlog of data points, each one with its own timestamp.

How do I reset my AWS alarm?

Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/ . In the navigation pane, choose Alarms. Select the check box to the left of the name of the alarm, and choose Actions, Delete.

Why would an Amazon CloudWatch alarm report as insufficient data instead of OK or alarm?

If your CloudWatch alarm is in the INSUFFICIENT_DATA, it can indicate any one of the following reasons: An Amazon CloudWatch alarm has just started. The metric is not available. There is insufficient data for the metric to establish the alarm state.

How long does CloudWatch alarm stay in alarm state?

Alarm history is available for 14 days. To view your alarm history, log in to CloudWatch in the Amazon Web Services Management Console, choose Alarms from the menu at left, select your alarm, and click the History tab in the lower panel.


1 Answers

What you are seeing is normal, if you don't already have a process running that is polling the queue. You have to have something running that will at least periodically poll the queue, and the insufficient data condition should then clear itself. SQS sends nothing to cloudwatch if the queue has no producers or consumers for approximately 6 hours.

The metrics you configure with CloudWatch for your Amazon SQS queues are automatically collected and pushed to CloudWatch every five minutes. These metrics are gathered on all queues that meet the CloudWatch guidelines for being active. A queue is considered active by CloudWatch for up to six hours from the last activity (i.e., any API call) on the queue.

http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/MonitorSQSwithCloudWatch.html

like image 160
Michael - sqlbot Avatar answered Oct 21 '22 04:10

Michael - sqlbot