Skip to main content

Cloudwatch

important

Harness supports only the Metrics Insight query language.

Before you begin

This page assumes you have followed the rest of the steps to set up CV. To learn more, go to Configure CV

Add Cloudwatch as a health source

This option is available only if you have configured the service and environment as fixed values.

A Health Source is basically a mapping of a Harness Service to the service in a deployment environment monitored by an APM or logging tool.

  1. In Health Sources, click Add. The Add New Health Source settings appear.

  2. In Select health source type, select CloudWatch.

  3. In Health Source Name, enter a name for the Health Source.

  4. Under Connect Health Source, click Select Connector.

  5. In Connector settings, you can either choose an existing connector or click New Connector.

  6. Click Apply Selected. The Connector is added to the Health Source.

  7. In Select Feature, select the CloudWatch feature:

    • CloudWatch Metrics
    • CloudWatch Logs
    note

    CloudWatch Logs is currently behind the feature flag CDS_CV_CLOUDWATCH_LOGS_ENABLED. Contact Harness Support to enable it.

  8. Click Next.

Configuration

Depending on your feature choice, do the following configuration steps.

  1. Select the AWS Region.
  2. Click + Add Metric.

You can customize the metrics to map the Harness Service to the monitored environment in Query Specifications and Mapping settings.

  1. Enter a name for the metric in Metric Name.

  2. Enter a name for the group in Group Name.

  3. Select the services you want to apply to the metric under Assign. At least one selection is required.

  4. If you select Continuous Verification or Service Health, you will need to configure a risk profile. Expand the following block to learn more.

    Risk Profile settings

    Risk Profile

    note

    The Risk Profile section is only visible if you have selected Continuous Verification (Applied to the pipelines in the Continuous Deployment) or Service Health in the Assign section.

    1. Under Risk Category, select one of the following options:
    • Errors
    • Infrastructure
    • Performance/Throughput
    • Performance/Other
    • Performance/Response Time
    1. Under Deviation Compared To Baseline, select the following settings to measure your service's behavior and calculate deviations from the health source:
    • Higher counts = higher risk

    • Lower counts = higher risk

      Note that you can select multiple options.

    Map service instance identifier

    note

    The Map service instance identifier (SII) section is only visible if you have selected Continuous Verification (Applied to the pipelines in the Continuous Deployment) in the Assign section.

    In Service Instance Identifier (only needed for CV), specify the service instance identifier, which represents a dynamically created service that you deploy using Harness. The default value is _sourceHost.

    When doing canary deployments, ensure that the SII can be used to identify the canary instance of the service, or CV will not work properly."

  5. Enter the query in the Query field. This field can also be a Harness expression or runtime input.

  6. Click Fetch Records to retrieve the details.

  7. Click Submit. The Health Source is displayed in the Verify step.


You can add one or more Health Sources for each APM or logging provider.