Set up Amazon CloudWatch alarm for AWS CodePipeline - DevOps Monitoring Dashboard on AWS

Set up Amazon CloudWatch alarm for AWS CodePipeline

You can use the solution to monitor the MTTR metric of your AWS CodePipeline. To do so, deploy the pipeline-alarm.template into the AWS account where you deployed the main AWS CloudFormation template for the solution. This will create an Amazon CloudWatch alarm that monitors the state (FAILED or SUCCEEDED) of your pipeline. Whenever the pipeline state changes, it invokes the alarm. This will generate events that are needed for calculating MTTR metrics.

Parameter Default Description
CodePipeline Name <requires input> The name of the CodePipeline that you want to monitor. This name becomes part of the CloudWatch alarm name.
Create a new log group

YES

Whether or not to create a new log group.

If you are deploying this stack for the first time, you should select YES. If the log group for the pipeline already exists from a previous deployment, select NO.

Log Group Name <requires input>

Name of the log group (new or existing) to write the CloudWatch metrics into.

If you have selected YES to create a new log group, you can enter an arbitrary log group name here. If you choose to use an existing log group, enter the name of the existing log group.

Repository Name <requires input> The name of the repository which is the source of your CodePipeline. This name becomes part of the CloudWatch alarm name.

Once the stack is deployed successfully, go to the Resources tab of the CloudFormation stack to view the newly created alarm.

CloudWatch alarm

CloudWatch alarm