3 - Verify Deployments with CloudWatch
The following procedure describes how to add CloudWatch as a verification step in a Harness workflow. For more information about workflows, see Add a Workflow.
Once you run a deployment and CloudWatch preforms verification, Harness' machine-learning verification analysis will assess the risk level of the deployment.
Deployment Verification Setup
To verify your deployment with CloudWatch, do the following:
- Ensure that you have added AWS as a cloud provider, as described above.
- In your workflow, under Verify Service, click Add Verification, and then click CloudWatch. The CloudWatch dialog appears.
The CloudWatch dialog has the following fields.
Select the AWS cloud provider you set up earlier.
Select the AWS region where the EC2 and/or ELB are located.
You simply need to select this option and Harness will use the CloudWatch monitoring for the Lambda function(s) the Workflow is deploying.
You can select ELB Metrics (Load Balancers, Metric Names) but they are not required. For information on Lambda metrics, see AWS Lambda Metrics.
This drop-down menu contains the available EC2 metrics. Select the metrics to monitor. For more information, see Using Amazon CloudWatch Metrics from AWS.You can see the available metrics in CloudWatch. Click Metrics, and then click All metrics.
Expand the ECS Metrics option and specify the Cluster and Metric Names for monitoring.
ELB Metrics are available for all of the CloudWatch types. Add each load balancer you want to monitor. For more information, see Elastic Load Balancing Metrics and Dimensions from AWS.
Select the load balancer to monitor. The list of load balancers is populated according to the AWS cloud provider and region you selected.
This drop-down menu contains the available ELB metrics. Select the metrics you want to monitor.
Analysis Time duration
Set the duration for the verification step. If a verification step exceeds the value, the workflow Failure Strategy is triggered. For example, if the Failure Strategy is Ignore, then the verification state is marked Failed but the workflow execution continues.
Baseline for Risk Analysis
Execute with previous steps
Check this checkbox to run this verification step in parallel with the previous steps in Verify Service.
Here is an example of a completed CloudWatch verification step.
When you are finished, click SUBMIT. The CloudWatch verification step is added to your workflow.
Once you have deployed your workflow (or pipeline) using the CloudWatch verification step, you can automatically verify cloud application and infrastructure performance across your deployment. For more information, see Add a Workflow and Add a Pipeline.
To see the results of Harness machine-learning evaluation of your CloudWatch verification, in your workflow or pipeline deployment you can expand the Verify Service step and then click the CloudWatch step.
You can also see the evaluation in the Continuous Verification dashboard. The workflow verification view is for the DevOps user who developed the workflow. The Continuous Verification dashboard is where all future deployments are displayed for developers and others interested in deployment analysis.
To learn about the verification analysis features, see the following sections.
Harness supports Metrics from CloudWatch for Lambda, EC2, ECS, and ELB.
Deployment info - See the verification analysis for each deployment, with information on its service, environment, pipeline, and workflows.
Verification phases and providers - See the verification phases for each verification provider. Click each provider for logs and analysis.
Verification timeline - See when each deployment and verification was performed.
Web Transaction Analysis
Execution details - See the details of verification execution. Total is the total time the verification step took, and Analysis duration is how long the analysis took.
Risk level analysis - Get an overall risk level and view the cluster chart to see events.
Web Transaction-level summary - See a summary of each transaction with the query string, error values comparison, and a risk analysis summary.
Event-level analysis - See the threat level for each event captured.
Tune event capture - Remove events from analysis at the service, workflow, execution, or overall level.
Event distribution - Click the chart icon to see an event distribution including the measured data, baseline data, and event frequency.