diff --git a/.ci_cd/aws/cloudformation-create-ec2.yml b/.ci_cd/aws/cloudformation-create-ec2.yml index 91361dd95f..0ade514234 100644 --- a/.ci_cd/aws/cloudformation-create-ec2.yml +++ b/.ci_cd/aws/cloudformation-create-ec2.yml @@ -1389,12 +1389,15 @@ Resources: Type: AWS::CloudWatch::Alarm Condition: MetricsEnabled Properties: - AlarmDescription: Attribute event rate outside the expected band (3 standard deviations) for 2 of the last 3 5-minute periods + # A wider band and a longer window ride out short bursts and stop the alarm flapping when the rate sits near + # the band edge. A lasting step change (e.g. many devices added) still alarms until the model has adapted; to + # retrain sooner, exclude the time before the step from the detector's training (ExcludedTimeRanges) + AlarmDescription: Attribute event rate outside the expected band (4 standard deviations) for 3 of the last 4 15-minute periods ComparisonOperator: LessThanLowerOrGreaterThanUpperThreshold - EvaluationPeriods: 3 - DatapointsToAlarm: 2 + EvaluationPeriods: 4 + DatapointsToAlarm: 3 Metrics: - - Expression: ANOMALY_DETECTION_BAND(m1, 3) + - Expression: ANOMALY_DETECTION_BAND(m1, 4) Id: ad1 - Id: m1 MetricStat: @@ -1404,7 +1407,7 @@ Resources: Dimensions: - Name: InstanceName Value: !Ref Host - Period: 300 + Period: 900 Stat: Average ThresholdMetricId: ad1 TreatMissingData: breaching