Skip to content

How do I troubleshoot my CloudWatch alarm in the INSUFFICIENT_DATA state?

3 minute read
0

I want to troubleshoot my Amazon CloudWatch alarm when it’s in the INSUFFICIENT_DATA state.

Resolution

When you create a CloudWatch alarm, the alarm starts in the INSUFFICIENT_DATA state. Your CloudWatch alarm remains in INSUFFICIENT_DATA state until CloudWatch evaluates the metric that it monitors. Then, your alarm transitions out of the INSUFFICIENT_DATA state within a few minutes of creation.

If your alarm remains in the INSUFFICIENT_DATA state, then take the following actions.

Missing data points

If you have a metric that monitors events such as infrastructure changes, network failures, and service disruptions, then the metric doesn't regularly report data points. If an alarm doesn't have metric data points in a specified time period, then the data points are missing from CloudWatch. Then, the alarm remains in the INSUFFICIENT_DATA state.

To resolve this issue, make sure that you configure how CloudWatch alarms treat missing data points.

Misconfigured metric parameters

You can define a metric with a namespace, a metric name, and up to 30 dimensions. For CloudWatch to successfully retrieve a data point, you must specify a timestamp, and you can additionally specify a unit. If you incorrectly provide a value for one of these parameters, then CloudWatch tries to retrieve a metric that doesn't exist, and you get an empty dataset.

Note: Data points usually push to a metric with a single unit. You don't have to specify the unit when you create an alarm. It's a best practice to use the correct unit when you have multiple units for your metric data points.

To resolve this issue, complete the following steps:

  1. Run the DescribeAlarms API operation to get a complete list of parameters for your monitored metrics.
  2. Run the ListMetrics API operation to compare the ListMetrics output to the list of parameters for your monitored metrics.
  3. Check the metric parameters for misspellings and incorrect or missing dimensions.

Misconfigured alarm periods

You can configure an alarm to retrieve data points at your required frequency. However, if you use a shorter period than what the service or source uses, then you might get unwanted alarm states. To resolve this issue, configure your alarm's period to be greater than or equal to the period that the metric data points are pushed. Also, you can set your alarm to use "M out of N" settings. For more information, see Evaluating an alarm.

Delayed delivery of data points

If you have a standard alarm setup, then the alarm evaluates your metric every minute. When CloudWatch evaluates a metric, the alarm retrieves the available data points from the configured metric. If you don't have connectivity when your alarm evaluates the metric, then the alarm can't retrieve the data points and moves to the INSUFFICIENT_DATA state.

After you restore connectivity, your AWS service sends the backlog of data points with timestamps to CloudWatch. The alarm retrieves recent data points based on the period and the evaluation period that you specified. If the CloudWatch alarm evaluated the timeframe and the alarm history indicates an INSUFFICIENT_DATA state, then you get an error message similar to the following:

"stateValue": "INSUFFICIENT_DATA", "stateReason": "Insufficient Data: 2 datapoints were unknown."

To resolve this issue, configure how your CloudWatch alarm treats missing data.