3 - Verify Deployments with CloudWatch

Updated 1 day ago by Michael Cretzman

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.

In order to obtain the names of the host(s), pod(s), or container(s) where your service is deployed, the verification provider should be added to your workflow after you have run at least one successful deployment.

Deployment Verification Setup

To verify your deployment with CloudWatch, do the following:

  1. Ensure that you have added AWS as a Cloud Provider, as described in CloudWatch Connection Setup.
  2. In your Workflow, under Verify Service, click Add Verification.
  3. In the resulting Add Step settings, select Performance Monitoring > CloudWatch.
  4. Click Next. The Configure CloudWatch settings appear.

These settings include the following fields.

Field

Description

CloudWatch Server

Select the AWS Cloud Provider you set up in CloudWatch Connection Setup. You can also enter variable expressions, such as: ${serviceVariable.cloudwatch_connector_name}.

If the Cloudwatch Server field contains an expression, the Region field must also use an expression.

Region

Select the AWS region where the EC2 and/or ELB are located. You can also enter variable expressions, such as: ${env.name}.

If the Cloudwatch Server field contains an expression, the Region field must also use an expression.

Lambda

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.

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

ECS Metrics

Expand the ECS Metrics option and specify the Cluster and Metric Names for monitoring.

ELB Metrics

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.

Load Balancers

Select the load balancer to monitor. The list of load balancers is populated according to the AWS cloud provider and region you selected. (Note: For CloudWatch analysis to appear, you must select a load balancer that provides at least 7 days of historical data for comparison.)

Metrics Name

This drop-down menu contains the available ELB metrics. Select the metrics you want to monitor.

Expression for Host/Container name

The expression entered here should resolve to a host/container name in your deployment environment. By default, the expression is ${host.hostName}. If you begin typing the expression into the field, the field provides expression assistance.

You can also click Guide from Example to select available hosts from a drop-down list and test them.

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.

See  CV Strategies, Tuning, and Best Practices.

Baseline for Risk Analysis

See  CV Strategies, Tuning, and Best Practices.

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 Test to verify your configuration. Once the test succeeds, click Submit. This adds the CloudWatch verification step to your Workflow.

Verification Results

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.

Workflow Verification

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.

Continuous Verification

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.

Clicking a deployment instance open the deployment details in the Deployments page.

To learn about the verification analysis features, see the following sections.

Deployments

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.

Next Steps


How did we do?