binbashar / le-tf-infra-aws

Terraform code for Leverage Reference Architecture for AWS, designed under optimal configs for the most popular modern web and mobile applications needs.
https://www.binbash.co/leverage
Apache License 2.0
24 stars 7 forks source link

FEATURE | Add green alert to Cloudwatch Synthetic Canaries #561

Open juanmatias opened 3 months ago

juanmatias commented 3 months ago

Describe the Feature

Based on the added AWS Cloudwatch Synthetics Canaries layer (in this PR ), which has only alerts triggered by a red situation (endpoints check failing), add an alert to notify when the canary goes from red to green.

Expected Behavior

To be notified when a red situation arises but also when the green status is shown again.

Use Case

Users checking alerts channels should be notified when the situation is fixed.

Describe Ideal Solution

Canary should create metrics so Cloudwatch can determine if a green status is found after a red one and alert.

Alternatives Considered

As per documentation found in the web, one way is to persist the canary run status. This way, each time the canary runs it can check if the previous status was red and the current one is green, then creates a notification that can be read by Cloudwatch.