Configure the AI Verify (v1) Step
Add and configure the AI Verify (v1) step to verify deployments with health sources
Continuous Verification integrates with health sources to verify that the deployed service is running safely, support automatic rollbacks, and apply machine learning to deployments so anomalies can be flagged in later runs.
This topic covers how to add and configure health sources for the AI Verify (v1) step.
What you will learn from this topic
How to add the AI Verify (v1) step during strategy selection or to an existing Execution
How to create a monitored service and add health sources
How to set sensitivity, duration, and optional configurable properties
How to enable sub-task webhook notifications and pin a baseline
Before you begin
Confirm the following before you configure the AI Verify (v1) step:
Deploy stage: A Continuous Delivery Deploy stage with a service, environment, and execution strategy.
Health source access: Connectors and credentials for the APM or logging tool you will use. Go to health sources to review supported sources.
Monitored service concept: A monitored service maps a Harness service to a service monitored by your APM or logging tool. Go to Monitored Service to review the Platform entity.
Continuous Verification types: Match the verification type to your deployment strategy. Go to Continuous Verification type for type definitions.
Verification setup options
To use the AI Verify (v1) step, you need a Harness monitored service. You can set up a monitored service in the AI Verify (v1) step in a Deploy stage.
There are other ways to set up a monitored service. Go to Monitored Service to review those options.
This topic sets up the monitored service as part of the AI Verify (v1) step.
Add the AI Verify (v1) step
There are two ways to add the AI Verify (v1) step.
Add during strategy selection
Perform the following steps when you select the stage deployment strategy for the first time:
Open the Execution settings and select the deployment strategy.
Select Enable Verification.
Harness adds the Verify step automatically. For example, the following image shows a stage where the Canary strategy and Enable Verification were selected.

Add to an existing Execution
You can also add the AI Verify (v1) step to the Execution section of a Deploy stage in a pipeline you previously created.
Click Add Step after the deployment step.
Select Verify.

Enter a name and timeout
In Name, enter a name for the step.
In Timeout, enter a timeout value for the step.
You can use the following units:
wfor weeksdfor dayshfor hoursmfor minutessfor secondsmsfor milliseconds
The maximum is 53w. Timeouts can also be set at the pipeline level.
Select a Continuous Verification type
In Continuous Verification Type, select a type that matches your deployment strategy.
Create a monitored service
In Monitored Service, click Click to autocreate a monitored service.
Harness creates a monitored service using a concatenation of the service and environment names. For example, a service named todolist and an environment named dev results in a monitored service named todolist_dev.
Add health sources
Harness supports a wide variety of health sources. For the full list and setup instructions for each source, go to health sources.
Select sensitivity
In Sensitivity, select High, Medium, or Low based on the risk level used as failure criteria during the deployment.
Select duration
Select how long you want Harness to analyze and monitor the logs and APM data points. Harness waits for 2-3 minutes to allow enough time for the data to be sent to the APM or logging tool before it analyzes the data. This wait time is standard with monitoring tools.
The recommended Duration is 10 min for logging providers and 15 min for APM and infrastructure providers.
Configurable properties
The AI Verify (v1) step supports configurable properties that let you customize verification behavior and access verification results in subsequent pipeline steps. This capability is controlled by the feature flag CDS_CV_INPUT_OUTPUT_VARIABLES_ENABLED. Contact Harness Support if the option is not available in your account.
To add a configurable property, perform the following steps:
In the AI Verify (v1) step configuration, expand the Optional section.
Under Configurable Properties, select a property from the dropdown.
Enter the value for the selected property.
deploymentStartTime
Use deploymentStartTime to specify when the deployment started. This tells Harness where to anchor the verification window, so the system can collect pre-deployment baseline data for the configured duration before this time. Enter the timestamp in UTC using one of the following formats:
ISO 8601 (for example,
2023-03-10T15:30:00Z)Common date/time format (for example,
2023-03-10 15:30:00)Unix epoch timestamps (for example,
1678457400)
You can also use a pipeline expression to set the value dynamically. For example, <+pipeline.stages.stage_name.spec.execution.steps.step_name.startTs> resolves to the start timestamp of another step in your pipeline.
Timestamps that have not been reached when the step runs are not supported as fixed or runtime values. If you specify a time that has not been reached when the step runs, verification fails. If the specified time has already passed when the step executes, it is used as expected.
dataCollectionDuration
Use dataCollectionDuration to override the default data collection interval for the verification window. Enter the value as a positive integer representing the number of minutes. The maximum allowed value is 60 minutes.
customVerificationStartTime
By default, the post-deployment data collection window opens at the moment Harness executes the AI Verify (v1) step. Deploy stage deployment steps wait for a steady state before completing, which means the AI Verify (v1) step starts after a delay from when your service began running. During that delay, your health source may already be recording logs and metrics that fall outside the collection window.
Use customVerificationStartTime to shift the window start to an earlier timestamp so that data already recorded by your health source is included in the analysis. Enter a timestamp using any of the formats listed under deploymentStartTime. The value must be no earlier than the deployment start time.
If the custom time is earlier than the actual verification start time, Harness uses it as the window start. If the custom time is later than the actual verification start time, Harness ignores it, falls back to the actual verification start time, and logs a warning in the execution console.
For verification durations under 30 minutes, Harness buckets data in one-minute intervals, so a custom start time that falls earlier within a minute expands the collection window by one full minute.
Common use cases for this property include:
Capturing head-of-deployment logs: If your health source (for example, Dynatrace) begins recording immediately when the service starts, set
customVerificationStartTimeto the deployment step start time to avoid missing the earliest entries.Steps between deployment and verification: If you have additional steps between your deployment step and the AI Verify (v1) step, metrics and logs generated while those steps run are normally excluded from verification. Setting this property to the deployment step start time includes that data.
Sub-task notifications
Sub-task webhook notifications are controlled by the feature flag CDS_CV_SUB_TASK_CUSTOM_WEBHOOK_NOTIFICATIONS_ENABLED. Contact Harness Support if the option is not available in your account.
Harness can send detailed webhook notifications for verification sub-tasks, so you can track the progress and results of individual verification operations such as data collection, log analysis, and time series analysis. This enables fine-grained monitoring and integration with external systems.
Enable sub-task notifications
To configure custom webhook notifications for verification sub-tasks, perform the following steps:
In the AI Verify (v1) step configuration, expand the Optional section.
Select the Enable custom webhook notification checkbox.
Enter the URL to be called for the webhook endpoint.
(Optional) Add custom headers by clicking + Add Headers and providing name-value pairs.

The following YAML shows a configuration example:
Notification delivery options
You can choose how notifications are delivered:
Platform (default): Notifications are sent through the Harness platform.
Delegate: Notifications are sent through a Harness Delegate. When using delegate delivery, you can optionally specify delegate selectors to control which delegates handle the webhook calls.
Notification event types
When enabled, Harness sends webhook notifications for the following verification sub-task events.
Data Collection Task
Sent for data collection task status for a verification window.
Deployment Time Series Analysis
Sent when time series (metric) analysis completes for a verification window.
Verification Terminal State
Sent when the verification step reaches a terminal state.
Payload field descriptions
The following fields help you correlate related notifications for a single verification execution:
verificationJobInstanceId: Unique identifier for the verification job instanceplanExecutionId: Pipeline execution identifierverificationTaskId: Unique identifier for the verification task
Use these fields to correlate and group related notifications for a single verification execution.
Event types include:
DataCollectionTask: Data collection completedDeploymentLogAnalysis: Logs analysis completedDeploymentTimeSeriesAnalysis: Metric analysis completedVerificationTerminalState: Final verification result
For a typical 5-minute verification step, you can expect multiple webhook notifications as sub-tasks progress, with analysis notifications, then data collection notifications, then a terminal notification with final status.
Test webhook configuration
After configuring your webhook URL and headers, click Test to send a sample notification to your webhook endpoint. This helps verify that your endpoint is configured to receive and process the notifications.
Specify artifact tag
In Artifact Tag, use a Harness expression.
The expression <+serviceConfig.artifacts.primary.tag> refers to the primary artifact.
Advanced settings
In Advanced, you can select the following options:
Deploy and review results
After setting up the Verify step, click Apply Changes.
Click Run to run the pipeline.
In Run Pipeline, select the tag for the artifact if a tag was not added in the Artifact Details settings.
Click Run Pipeline.
When the pipeline is running, click the Verify step.
Verification can take a few minutes.
Once verification is complete, the AI Verify (v1) step shows results similar to the following:

The risk level might initially display a number of violations, but the red and orange colored host often change to green over the duration.
Summary
The Summary section shows the number of logs that are in violation.
Console View
Click Console View or click View Details in Summary to inspect verification in more detail.
You can use the search option to search for any specific metric or transaction you want.
Set a pinned baseline
Pinned baseline verification is controlled by the feature flag SRM_ENABLE_BASELINE_BASED_VERIFICATION. Contact Harness Support if the option is not available in your account.
You can set a specific verification in a successful pipeline execution as a baseline. This is available with Load Testing as the verification type.
Set successful verification as a baseline
To set a verification as the baseline for future verifications, perform the following steps:
In Harness, go to Deployments -> Pipelines, and find the pipeline you want to use as the baseline.
Select the successful pipeline execution with the verification that you want to use as the baseline. The pipeline execution is displayed.
On the pipeline execution, go to the Verify section, then select Pin baseline.
The selected verification is set as the baseline for future verifications.
Replace an existing pinned baseline
To use a new baseline from a pipeline and replace the existing pinned baseline, perform the following steps:
In Harness, go to Deployments -> Pipelines, and find the pipeline from which you want to remove the baseline.
Select the successful pipeline execution with the verification that you previously pinned as the baseline.
On the pipeline execution, go to the Verify section, then select Pin baseline.
A confirmation alert message appears, asking if you want to replace the existing pinned baseline with the current verification. After you confirm, the existing pinned baseline is replaced with the current verification.
Next steps
Health sources: Configure APM and logging health sources for verification.
AI Verify (v1) overview: Review Continuous Verification types and related AI Verify (v1) concepts.
Monitored Service: Manage monitored services in the Harness Platform.
Last updated
Was this helpful?