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.
In Health Sources, click Add. The Add New Health Source settings appear.

In Select health source type, select CloudWatch.
In Health Source Name, enter a name for the Health Source.
Under Connect Health Source, click Select Connector.
In Connector settings, you can either choose an existing connector or click New Connector.

Click Apply Selected. The Connector is added to the Health Source.
In Select Feature, select the CloudWatch feature:
CloudWatch Metrics
CloudWatch Logs
Click Next.
Configuration
Depending on your feature choice, do the following configuration steps.
Select the AWS Region.
Click + Add Metric.
You can customize the metrics to map the Harness Service to the monitored environment in Query Specifications and Mapping settings.
Enter a name for the metric in Metric Name.
Enter a name for the group in Group Name.
Select the services you want to apply to the metric under Assign. At least one selection is required.
If you select Continuous Verification or Service Health, you will need to configure a risk profile. Expand the following block to learn more.
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
WHEREandORDER BYclauses. UseWHEREto filter metrics by dimension values — for example, to isolate metrics for a specific ALB target group or EC2 instance. UseORDER BYto sort results when your query returns multiple time series.Click Fetch Records to retrieve the details.

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

Click + Add Query.
Enter a Query Name.
Click Submit.
Select the AWS Region.
Select a CloudWatch Log Group. This field can also be a Harness expression or runtime input.
Under Define Query, enter your query. This query can also be a runtime input or expression.
After writing your fixed input query, click Run Query.
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.
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?