The following sections describe how Harness integrates Datadog into Harness Continuous Verification to monitor your live, production services and verify your deployments:
- Datadog and Harness
- Setup Preview
- Verification Provider Setup
- 24/7 Service Guard Setup
- Verify Deployments
Datadog and Harness
Datadog delivers real-time and trending data about application performance by seamlessly aggregating metrics and events across the full DevOps stack. Datadog automatically collects logs from all your services, applications, and platforms.
Harness Continuous Verification integrates with Datadog to verify your deployments and live production applications using the following Harness features:
- 24/7 Service Guard - Monitors your live, production applications.
- Deployment Verification - Monitors your application deployments, and performs automatic rollback according to your criteria.
This document describes how to set up these Harness Continuous Verification features and monitor your deployments and production applications using its unsupervised machine-learning functionality.
Analysis with Datadog
You set up Datadog and Harness in the following way:
- Datadog - Monitor your application using Datadog. In this article, we assume that you are using Datadog to monitor your application already.
- Verification Provider Setup - In Harness, you connect Harness to your Datadog account, adding Datadog as a Harness Verification Provider.
- Harness Application - Create a Harness Application with a Service and an Environment. We do not cover Application set up in this article. See Application Checklist.
- 24/7 Service Guard Setup- In the Environment, set up 24/7 Service Guard to monitor your live, production application.
- Verify Deployments:
- Add a Workflow to your Harness Application and deploy your microservice or application to the service infrastructure in your Environment.
- After you have run a successful deployment, you then add verification steps to the Workflow using your Verification Provider.
- Harness uses unsupervised machine-learning and Datadog analytics to analyze your future deployments, discovering events that might be causing your deployments to fail. Then you can use this information to set rollback criteria and improve your deployments.
Verification Provider Setup
The first step in using Datadog with Harness is to set up an Datadog Verification Provider in Harness.
A Harness Verification Provider is a connection to monitoring tools such as Datadog. Once Harness is connected, you can use Harness 24/7 Service Guard and Deployment Verification with your Datadog data and analysis.
To add Datadog as a verification provider, do the following:
- Click Setup.
- Click Connectors, and then click Verification Providers.
- Click Add Verification Provider, and select Datadog. The Datadog dialog for your provider appears.
- Complete the following fields of the Add Datadog Verification Provider dialog.
Enter the URL of the Datadog server. Simply take the URL from the Datadog dashboard, such as https://app.datadoghq.com/ and add the API and version: https://app.datadoghq.com/api/v1/.
Enter the API key for API calls.
To create an API key in Datadog, do the following:
Enter the application key.
To create an application key in Datadog, do the following:
Enter a display name for the provider. If you are going to use multiple providers of the same type, ensure you give each provider a different name.
If you want to restrict the use of a provider to specific applications and environments, do the following:
In Usage Scope, click the drop-down under Applications, and click the name of the application.
In Environments, click the name of the environment.
24/7 Service Guard Setup
Harness 24/7 Service Guard monitors your live applications, catching problems that surface minutes or hours following deployment. For more information, see 24/7 Service Guard.
You can add your Datadog monitoring to Harness 24/7 Service Guard in your Harness Application Environment. For a setup overview, see Setup Preview.
To set up 24/7 Service Guard for Datadog, do the following:
- Ensure that you have added Datadog as a Harness Verification Provider, as described in Verification Provider Setup.
- In your Harness Application, ensure that you have added a Service, as described in Services. For 24/7 Service Guard, you do not need to add an Artifact Source to the Service, or configure its settings. You simply need to create a Service and name it. It will represent your application for 24/7 Service Guard.
- In your Harness Application, click Environments.
- In Environments, ensure that you have added an Environment for the Service you added. For steps on adding an Environment, see Environments.
- Click the Environment for your Service. Typically, the Environment Type is Production.
- In the Environment page, locate 24/7 Service Guard.
- In 24/7 Service Guard, click Add Service Verification, and then click Datadog. The Datadog dialog appears.
- Fill out the dialog. The dialog has the following fields.
The name that will identify this service on the Continuous Verification dashboard. Use a name that indicates the environment and monitoring tool, such as Datadog.
The Harness Service to monitor with 24/7 Service Guard.
Select the Datadog Verification Provider to use.
In Datadog Service Name, enter which service in Datadog you want to monitor. By default, Datadog monitors the servlet hits (number of incoming requests), servlet duration, and errors. Harness will fetch this data for every Web transaction with the service you enter and display it in 24/7 Service Guard as Errors, Hits, Request Duration.
Select the Docker container infrastructure metrics to monitor.
In Datadog Tags, enter any tags that have been applied to your metrics in Datadog. These are the same tags used in Datadog Events, Metrics Explorer, etc.
Use the Datadog tag format, such as
Specify the sensitivity of the failure criteria.
Enable 24/7 Service Guard
Enable this setting to turn on 24/7 Service Guard. If you simply want to set up 24/7 Service Guard, but not enable it, leave this setting disabled.
When you are finished, the dialog will look something like this:
- Click TEST. Harness verifies the settings you entered.
- Click SUBMIT. The Datadog 24/7 Service Guard to configured.
To see the running 24/7 Service Guard analysis, click Continuous Verification.
The 24/7 Service Guard dashboard displays the production verification results.
For information on using the dashboard, see Using 24/7 Service Guard.
Harness can analyze Datadog data and analysis to verify, rollback, and improve deployments. To apply this analysis to your deployments, you set up Datadog as a verification step in a Harness Workflow.
Once you run a deployment and Datadog preforms verification, Harness' machine-learning verification analysis will assess the risk level of the deployment.
Deployment Verification Setup
To verify your deployment with Datadog, do the following:
- Ensure that you have added Datadog as a verification provider, as described above.
- In your workflow, under Verify Service, click Add Verification, and then click Datadog. The Datadog dialog appears.
- The Datadog dialog has the following fields.
Select the Datadog verification provider you added, as described above.
Select any of the Datadog API metrics. For a list of the API metrics, see Data Collected from Datadog.
Expression for Host/Container name
Enter an expression that evaluates to the host/container/pod name tagged in the Datadog events.
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.
Baseline for Risk Analysis
Select Previous Analysis to have this verification use the previous analysis for a baseline comparison. If your workflow is a Canary workflow type, you can select Canary Analysis to have this verification compare old versions of nodes to new versions of nodes in real-time.
For Canary Analysis and Previous Analysis, analysis happens at the host/node/pod level.
Execute with previous steps
Check this checkbox to run this verification step in parallel with the previous steps in Verify Service.
Specify the sensitivity of the failure criteria. When the criteria is met, the workflow Failure Strategy is triggered.
- Click TEST. Harness verifies the settings you entered.
- When you are finished, click SUBMIT. The Datadog verification step is added to your workflow.
Once you have deployed your workflow (or pipeline) using the Datadog 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.
To see the results of Harness machine-learning evaluation of your Datadog verification, in your workflow or pipeline deployment you can expand the Verify Service step and then click the Datadog step.
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.
To learn about the verification analysis features, see the following sections.
Verification phases and providers
Risk level analysis
Tune event capture