Description
Add a LogAlarm L2 construct to aws-cdk-lib/aws-cloudwatch so customers can define CloudWatch log alarms (alarms evaluated against the results of a scheduled CloudWatch Logs query) in CDK, without hand-writing the AWS::CloudWatch::LogAlarm L1 resource.
A log alarm runs a scheduled Logs query (query string + aggregation over one or more log groups) and compares the aggregated result against a threshold using an M-out-of-N evaluation. It can also surface matching log lines in the alarm notification. The construct extends AlarmBase (like Alarm, CompositeAlarm, and PromQLAlarm), reuses the existing ComparisonOperator/TreatMissingData enums, and is interchangeable anywhere an IAlarm is accepted.
Related: PromQL Alarm L2.
Proposed by: @rodrigotuna
Description
Add a
LogAlarmL2 construct toaws-cdk-lib/aws-cloudwatchso customers can define CloudWatch log alarms (alarms evaluated against the results of a scheduled CloudWatch Logs query) in CDK, without hand-writing theAWS::CloudWatch::LogAlarmL1 resource.A log alarm runs a scheduled Logs query (query string + aggregation over one or more log groups) and compares the aggregated result against a threshold using an M-out-of-N evaluation. It can also surface matching log lines in the alarm notification. The construct extends
AlarmBase(likeAlarm,CompositeAlarm, andPromQLAlarm), reuses the existingComparisonOperator/TreatMissingDataenums, and is interchangeable anywhere anIAlarmis accepted.Related: PromQL Alarm L2.
Proposed by: @rodrigotuna