Today I Learned

Handling missing data points in AWS metrics

Sometimes you might want to treat missing data as good (not breaching threshold) to avoid keeping insufficient state. AWS allows to specify few options:

  • 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.

For more details go here: AWS Docs

Terraform config:

  resource "aws_cloudwatch_metric_alarm" "some_resource_usage" {
  ...
    treat_missing_data = "notBreaching"
  }