CloudWatch : Repeating Alerts on Insufficient State Change

0

I am using AWS CLI with cloudwatch put-metric-alarm to set up custom memory alarms when over 50%. It is successful at sending alerts when shifting into the Alarm state from OK or Insufficient and when going from Alarm state to OK. However now it is sending alerts at the same rate when shifting from Insufficient state to Okay. Looking into the documentation it states that the Ok actions trigger when the alarm transitions to an OK state from any other state. Is there a way to stop alerts from the Insufficient State -> OK state?

2 Answers
0
Accepted Answer

Hello -

I think you'll want to configure Amazon CloudWatch to treat a lack of data differently. In short, you can specify CloudWatch to treat missing data points as any of the following:

  • notBreaching – Missing data points are treated as "good" and within the threshold
  • breaching – Missing data points are treated as "bad" and breaching the threshold
  • ignore – The current alarm state is maintained
  • missing – If all data points in the alarm evaluation range are missing, the alarm transitions to INSUFFICIENT_DATA.

The default option is missing, so I think this is why you are seeing the alarm back to OK. You might consider ignore or notBreaching depending on the behavior you are looking for.

You can find more information here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data

profile pictureAWS
answered 2 years ago
0

Hi, your question makes me wonder why your alarms transition from Insufficient state to OK - is it a one-off event only happening at alarm creation time, or is it a recurring behavior, in which case is it because your resources are transient and you turn them off making them stop emitting the metric, or is there another reason for your alarms to switch to the insufficient state? If it's a one-off event at alarm creation time, how impactful is it to your workflow? is it something that can be neglected? If it's recurring, you could work around it by using Paul's suggestion in the previous answer or apply metric math to your metric to fill missing datapoints with a 0 value, which would prevent your alarm from flipping to the insufficient state?

profile pictureAWS
Jsc
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions