- Newest
- Most votes
- Most comments
Alarm1 (Period: 30 minutes)
-
- At 12:00 PM, you send an API call. The alarm goes into the OK state.
-
- The next evaluation happens at 12:30 PM. Since there's no new API call, CloudWatch considers this period as missing data (which is treated as bad), but it needs one more evaluation to confirm the alarm state.
-
- At 1:00 PM (the second evaluation after 12:30 PM), it confirms no data, thus going into the alarm state at 1:30 PM.
Alarm2 (Period: 1 hour)
-
- At 12:00 PM, you send an API call. The alarm goes into the OK state.
-
- The next evaluation happens at 1:00 PM. Since there's no new API call, CloudWatch considers this period as missing data. At 2:00 PM, another evaluation happens with missing data.
-
- Finally, at 3:00 PM, it confirms no data, and the alarm goes into the alarm state at 3:00 PM.
You're observing an unexpected delay in your CloudWatch alarms triggering. Despite setting Alarm1 for a 30-minute evaluation period and Alarm2 for a 1-hour evaluation period, both alarms are triggering three times later than expected.
Troubleshooting Steps
Check Period and Evaluation Period
Ensure that your Period is significantly smaller than your Evaluation Period. For Alarm1, consider setting the Period to 5 minutes and Evaluation Period to 30 minutes. For Alarm2, consider setting the Period to 5 minutes and Evaluation Period to 60 minutes.
Adjust Datapoint to Alarm
If you want the alarm to trigger immediately after a single breach, keep the setting at 1 out of 1. If you want to introduce a delay, increase the value.
Review Missing Data Treatment If you're confident that missing data should not trigger the alarm, change the Missing Data Treatment to "Treat missing data as missing."
Evaluate Statistic
If you're only interested in whether the API count is zero, using Maximum might be more appropriate than Sum.
Verify Alarm Actions
Ensure that alarm actions are enabled and configured correctly.
Related Documentation Amazon CloudWatch Concepts: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html
Thanks @AmarnathAllemgari and @Sandeep Both of these replies are valid. So I guess, the reason why the alarm is firing on expected time because Cloudwatch wants to evaluate the threshold few times because there is a missing data.
Relevant content
- Accepted Answerasked 6 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 7 months ago