4

I am setting most of my custom metrics to cloud watch. Most of the metrics if you see for the whole day it follow a sine wave. If I set an alarm to trigger if threshold goes below a certain value, the same threshold applicable during off peak hour.

from what I can see there is only one threshold I can set. Any suggestions how to sent is up more intelligently.

kumar
  • 8,207
  • 20
  • 85
  • 176
  • 2
    Possible duplicate of [Can AWS CloudWatch alarms be paused/disabled during specific hours?](https://stackoverflow.com/questions/24737359/can-aws-cloudwatch-alarms-be-paused-disabled-during-specific-hours) – warbi Feb 18 '19 at 09:37

1 Answers1

0

What you are looking for is not a static threshold alarm - but rather an alarm that uses a prediction model - look at the CloudWatch Anomaly detection documentation

These work very well with sine wave metrics from my own experience (like requests/traffic graphs that follow daily trends).

Alternatively, you can also use the metric math function RATE() that calculates the rate of change per second - and create an alarm on that (see documentation here)

Returns the rate of change of the metric, per second. This is calculated as the difference between the latest data point value and the previous data point value, divided by the time difference in seconds between the two values.

Description on how to create alarms on metric math can be found in their documentation as well: Creating a CloudWatch alarm based on a metric math expression

srodriguez
  • 1,937
  • 2
  • 24
  • 42