> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/use-harness-platform/connectors/monitoring-and-logging-systems/add-a-custom-health-connector.md).

# 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](https://developer.harness.io/harness-platform/use-harness-platform/connectors/monitoring-and-logging-systems/monitoring-and-logging-systems-connectors-overview.md) 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 Custom Health connector](#add-a-custom-health-connector) to a Harness project.
* How to configure the [headers](#headers), [parameters](#parameters), and [validation path](#validation-path) that Harness uses to query your provider.
* How to choose the [delegates](#delegates-setup) that connect to your provider and verify the connection.

***

## 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](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-eeda7e20b8bd7c1174c2e81d0a9c239d0639e7a2%2Fcustom-health-connector-overview.png?alt=media)

### 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](https://developer.harness.io/harness-platform/use-harness-platform/secrets/add-use-text-secrets.md). To add more headers, click **Add Header**.
3. Click **Next**.

![Custom Health connector headers with the Base URL and key-value fields](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-94ded654a4d834477447fd13c9307970da45f55c%2Fcustom-health-connector-headers.png?alt=media)

**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](https://developer.harness.io/harness-platform/use-harness-platform/secrets/add-use-text-secrets.md). To add more parameters, click **Add Parameter**.
2. Click **Next**.

![Custom Health connector parameters with key-value fields](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-5a4706fe53b23647c6335be0b2de3281eba3a18c%2Fcustom-health-connector-parameters.png?alt=media)

**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](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-79dd3c96ed09485d6df02f34b629c2bfceb58f5c%2Fcustom-health-connector-validation-path.png?alt=media)

### 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](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-cc56ce88d3a10b68eed4a5dd9dfb5e2c22651c03%2Fcustom-health-connector-delegates-setup.png?alt=media)

### Verify Connection

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

***

## Next steps

* [Add a Grafana Loki connector](https://github.com/harness/harness-developer-hub/tree/main/docs/platform/use-harness-platform/connectors/monitoring-and-logging-systems/add-a-grafana-loki-connector.md): Use the Custom Health connector type to connect to Grafana Loki.
* [Use delegate selectors](https://developer.harness.io/harness-platform/use-harness-platform/delegates/delegate/manage-delegates/select-delegates-with-selectors.md): Control which delegates can connect to this connector.
