For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Add a New Relic connector

Add a New Relic connector so Harness can fetch metrics through the NerdGraph or Insights Query API for verification.

New Relic is a cloud-based observability platform that collects and analyzes telemetry from applications and infrastructure, including metrics, events, logs, and traces, which you can query using NRQL (New Relic Query Language). Add a New Relic connector in Harness to let your pipelines query your New Relic data. 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.

Go to Overview for information about all monitoring and logging connectors, such as scopes and delegate selection.


What you will learn from this topic


Before you begin

  • New Relic account: A New Relic account ID and an API key. Your account's subscription level must be Pro or higher to use New Relic's API. Go to Introduction to New Relic's REST API Explorer in the New Relic documentation for details.

  • Harness permissions: Permission to create connectors and secrets in Harness.


Add a New Relic connector

You can add a New Relic 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.

  1. Open your Harness project.

  2. In Project Settings, select Connectors.

  3. Click New Connector, then select New Relic under Monitoring and Logging Systems. The New Relic connector settings appear.

Overview

Configure the identity fields for the connector.

  1. In Name, enter a name for the connector. Harness generates the Id from the name.

  2. Optionally, add a Description and Tags.

  3. Click Continue.

New Relic connector overview settings

Credentials

Configure the following settings:

  1. In New Relic URL, select the URL of your New Relic API. The dropdown lists the following URLs:

    • https://insights-api.newrelic.com/

    • https://insights-api.eu.newrelic.com/

    • https://api.newrelic.com/v2/

    • https://api.eu.newrelic.com/v2/

  2. In New Relic Account Id, enter your account ID. To find it, copy the number after /accounts/ in the URL of the New Relic dashboard.

  3. In Encrypted API Key, select or create a Harness encrypted text secret that stores the API key for the server.

  4. Click Continue.

New Relic connector credentials with the URL, account ID, and API key fields

New Relic API support

New Relic supports multiple APIs. The Harness connector uses the NerdGraph API, or the deprecated New Relic Insights API, which supports NRQL.

If you have trouble connecting to the API, use the guidance for the API you selected.

NerdGraph API
  • Go to NerdGraph API in the New Relic documentation for the connection steps.

  • To access this API, use the user key of a specific account.

Insights Query API (deprecated)
  • Go to Insights query API in the New Relic documentation to generate the API key.

  • If you cannot find the step to generate the Insights query key, look for the API key types help in the New Relic help panel.

New Relic API key types help panel

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.

New Relic connector delegates setup with the delegate connectivity list

Verify Connection

Click Finish after the connection test succeeds. The connector is listed in Connectors page.

The usage scope of the connector is inherited from the secrets you use in the settings.


Sample YAML

The following example shows a YAML for the New Relic connector created in this topic.

YAML - New Relic connector

For the full connector YAML schema, including how to skip connector preflight checks, go to Create a connector using YAML.


Next steps

Last updated

Was this helpful?