Add a Dynatrace connector
Add a Dynatrace connector so Harness can fetch Classic metrics or Grail logs from Dynatrace for verification.
Dynatrace is a cloud-based observability platform that uses automatic discovery and AI-assisted analysis to monitor applications, infrastructure, and user experience, collecting metrics, traces, and logs. Add a Dynatrace connector in Harness to let your pipelines query metrics from your Dynatrace environment. Harness can then use that data in Continuous Verification to compare application behavior before and after a deployment, helping you confirm a release is healthy or trigger a rollback.
Harness supports two Dynatrace integrations, and each connector uses one of them:
Dynatrace Classic: Full Stack Observability metrics, using an API URL and API token.
Dynatrace Grail: Dynatrace Grail Logs, using a platform URL and platform token.
Go to Overview for information about all monitoring and logging connectors, such as scopes and delegate selection.
What you will learn from this topic
How to add a Dynatrace connector to a Harness project.
How to configure the credentials for Dynatrace Classic or Dynatrace Grail.
Before you begin
Dynatrace access: A Dynatrace environment where you can generate an API token, or a platform token for Grail.
Harness permissions: Permission to create connectors and secrets in Harness.
Add a Dynatrace connector
You can add a Dynatrace connector at the project, org, or account scope. This procedure covers the project scope, and the process is the same for org and account scope.
Perform the following steps to add a Dynatrace connector:
Open your Harness project.
In Project Settings, select Connectors.
Click New Connector, then select Dynatrace under Monitoring and Logging Systems. The Dynatrace connector settings appear.
Overview
Configure the identity fields for the connector:
In Name, enter a name for the connector. Harness generates the Id from the name.
Optionally, add a Description and Tags.
Click Continue.

Credentials
Select a Dynatrace Verification Provider from Dynatrace Classic and Dynatrace Grail.
Configure the following settings based on the verification provider you selected:
If you selected Dynatrace Classic:
In URL, enter the URL of your Dynatrace account. You must use an HTTPS URL.
In API Token, select or create a new Harness encrypted text secret that stores your Dynatrace API token.
Go to Access tokens (Dynatrace Classic) in the Dynatrace documentation to create an access token.

Dynatrace connector credentials with the Dynatrace Classic settings If you selected Dynatrace Grail:
In Platform URL, enter the platform URL of your Dynatrace account. You must use an HTTPS URL.
In Platform Token, select or create a new Harness encrypted text secret that stores your Dynatrace platform token. The token needs the following permissions:
For connector setup:
For verifying and running log-based queries:
Go to Platform tokens in the Dynatrace documentation to create a platform token.

Dynatrace connector credentials with the Dynatrace Grail settings
Delegates Setup
Select one of the following options:
Use any available Delegate: Harness selects an available delegate at runtime.
Only use Delegates with all of the following tags: Enter the tags of the delegates Harness must use with this connector.
The Test Delegate Connectivity list shows the delegates that match your selection. To add a delegate, click Install new Delegate.
Click Save and Continue.

Verify Connection
Click Finish after the connection test succeeds. The connector is listed in Connectors page.
Sample YAML
The following example shows a YAML for a Dynatrace Classic connector.
For the full connector YAML schema, including how to skip connector preflight checks, go to Create a connector using YAML.
Next steps
Use delegate selectors: Control which delegates can connect to this connector.
Add a text secret: Store the Dynatrace token as a Harness secret.
Last updated
Was this helpful?