For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add a Custom Health connector

Add a Custom Health connector so Harness can fetch metrics from any provider that exposes an HTTP API.

The Custom Health connector connects Harness to any metrics or health provider that exposes an HTTP API. Use it when Harness does not have a dedicated connector for your provider, for example, Grafana Loki. Harness can then query your provider’s API and use the returned data in Continuous Verification to compare application behavior before and after a deployment, helping you confirm a release is healthy or trigger a rollback if it is not.

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

  • Provider API details: The URL, required headers, request parameters, and a validation query for your metrics provider.

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


Add a Custom Health connector

You can add a Custom Health 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 Custom Health connector:

  1. Open your Harness project.

  2. In Project Settings, select Connectors.

  3. Click New Connector, then select Custom Health under Monitoring and Logging Systems. The Custom Health 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.

Custom Health connector overview settings

Details

The Details step has three tabs: Headers, Parameters, and Validation Path. Configure each tab, then click Next to move to the next one.

Headers

In the Headers tab, configure the following settings:

  1. In Base URL, enter the URL of the metrics data provider. For example, https://mycompany.appd.com.

  2. Under Headers, enter the query headers your provider requires.

    • In Key, enter a valid query key.

    • In Value, select Plaintext and enter a value, or select a Harness encrypted text secret. To add more headers, click Add Header.

  3. Click Next.

Custom Health connector headers with the Base URL and key-value fields

Parameters

In the Parameters tab, configure the following settings:

  1. Under Parameters, enter the request parameters.

    • In Key, enter a valid query key.

    • In Value, select Plaintext and enter a value, or select a Harness encrypted text secret. To add more parameters, click Add Parameter.

  2. Click Next.

Custom Health connector parameters with key-value fields

Validation Path

In the Validation Path tab, configure the following settings:

  1. In Request Method, select GET or POST.

  2. In Validation Path, enter the query string from your metrics provider.

  3. Click Next.

Custom Health connector validation path with the request method options

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.

Custom Health connector delegates setup with the delegate connectivity list

Verify Connection

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


Next steps

Last updated

Was this helpful?