> 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-pagerduty-connector.md).

# Add a PagerDuty connector

Add a PagerDuty connector so Harness can use PagerDuty as a verification provider.

PagerDuty is an incident response and on-call management platform that alerts the right people when something goes wrong in production. Add a PagerDuty connector in Harness to bring your PagerDuty incidents into Service Reliability Management. Once the connector is set up, you can add PagerDuty as a change source for a monitored service, so incident activity is tracked alongside the service’s other changes.

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 PagerDuty connector](#add-a-pagerduty-connector) to a Harness project.
* How to configure the [API key](#credentials) that Harness uses to authenticate with PagerDuty.

***

## Before you begin

* **PagerDuty API key**: A PagerDuty API key that Harness can use to authenticate.
* **Harness permissions**: Permission to create connectors and secrets in Harness.

***

## Add a PagerDuty connector

You can add a PagerDuty 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 **PagerDuty** under **Monitoring and Logging Systems**. The PagerDuty 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**.

![PagerDuty connector overview settings](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-cb700728ca6d40c29e957c8f7ed51b39d1bf2516%2Fpagerduty-connector-overview.png?alt=media)

### Credentials

1. In **Encrypted API Key**, click **Create or Select a Secret**, then select or create a [Harness encrypted text secret](https://developer.harness.io/harness-platform/use-harness-platform/secrets/add-use-text-secrets.md) that stores your PagerDuty API key.
2. Click **Next**.

![PagerDuty connector credentials with the Encrypted API Key field](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-4cbd4b711f18d2d6f6aebda35564df7e4fbb4354%2Fpagerduty-connector-credentials.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**.

![PagerDuty 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-b507d8c6537a103a46335b95ee5c3b060c22a96a%2Fpagerduty-connector-delegates-setup.png?alt=media)

### 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 the PagerDuty connector created in this topic.

<details>

<summary>YAML - PagerDuty connector</summary>

```yaml
connector:
  name: your-pagerduty-connector # Replace with a name for your connector
  identifier: yourpagerdutyconnector # Replace with a unique identifier
  description: ""
  accountIdentifier: youraccountidentifier # Replace with your Harness account identifier
  orgIdentifier: default # Replace with your organization identifier, or remove for account scope
  projectIdentifier: yourprojectidentifier # Replace with your project identifier, or remove for org/account scope
  type: PagerDuty
  spec:
    apiTokenRef: your-api-key-secret # Replace with a reference to the Harness secret storing your PagerDuty API key
    ignoreTestConnection: false # Set to true only to skip connector preflight checks
```

</details>

For the full connector YAML schema, including how to skip connector preflight checks, go to [Create a connector using YAML](https://developer.harness.io/harness-platform/use-harness-platform/connectors/create-a-connector-using-yaml.md).

***

## Next steps

* [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.
* [Add a text secret](https://developer.harness.io/harness-platform/use-harness-platform/secrets/add-use-text-secrets.md): Store the PagerDuty API key as a Harness secret.
