For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cloudwatch

Learn how to set up Cloudwatch as a health source for CV

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

    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.

  5. Enter the query in the Query field using CloudWatch Metrics Insights SQL syntax. This field can also be a Harness expression or runtime input.

    Harness supports the full Metrics Insights query language, including WHERE and ORDER BY clauses. Use WHERE to filter metrics by dimension values — for example, to isolate metrics for a specific ALB target group or EC2 instance. Use ORDER BY to sort results when your query returns multiple time series.

    When you use Continuous Verification to compare a control group and a test group (for example, comparing two ALB target groups during a custom blue/green deployment), configure separate metric definitions with WHERE clauses that target each group's dimension values.

  6. Click Fetch Records to retrieve the details.

  7. Click Submit. The Health Source is displayed in the AI Verify (v1) step.

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

For more information on the prerequisites, configuration steps, and permissions required for enabling cloudwatch logs, go to Cloudwatch Logs

  1. Click + Add Query.

  2. Enter a Query Name.

  3. Click Submit.

  4. Select the AWS Region.

  5. Select a CloudWatch Log Group. This field can also be a Harness expression or runtime input.

  6. Under Define Query, enter your query. This query can also be a runtime input or expression.

  7. After writing your fixed input query, click Run Query.

  8. Next, complete the field mapping for the Timestamp Identifier, Service Instance Identifier, and Message Identifier. To do so, hit the + button icon and select the relevant field from the log that appears after running the query.

  9. Click Submit. The health source is displayed in the AI Verify (v1) step.


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

Last updated

Was this helpful?