# PagerdutyAlertChannel Construct - Checkly Docs

> Learn how to configure Pagerduty alert channels with the Checkly CLI.

Source: https://www.checklyhq.com/docs/constructs/pagerduty-alert-channel/

---

- Configuration Pagerduty Alert Channel Options
- General Alert Channel Options

Alert Channels

# PagerdutyAlertChannel Construct

Learn how to configure Pagerduty alert channels with the Checkly CLI.

For general information about alerting, see our docs on [the Pagerduty integration](https://www.checklyhq.com/docs/integrations/incident-management/pagerduty) and [alerting with Checkly](https://www.checklyhq.com/docs/communicate/alerts/overview).

Sends an alert notification to a specific service in your Pagerduty account.

```
import { PagerdutyAlertChannel } from 'checkly/constructs'

const pagerdutyChannel = new PagerdutyAlertChannel('pagerduty-channel-1', {
account: 'ACME',
serviceName: 'ACME products',
serviceKey: '872b9b58ff4a9n06d0dl9f20487bbqwew'
})
```

```
import { PagerdutyAlertChannel } from 'checkly/constructs'

const pagerdutyChannel = new PagerdutyAlertChannel('pagerduty-channel-1', {
account: 'ACME',
serviceName: 'ACME products',
serviceKey: '872b9b58ff4a9n06d0dl9f20487bbqwew',
sendRecovery: true,
sendFailure: true,
sendDegraded: true,
sslExpiry: true,
sslExpiryThreshold: 30,
})
```

If you need to reference existing alert channels that were created outside of your CLI project, use [`fromId()`](https://www.checklyhq.com/docs/constructs/alert-channel#using-fromid-to-reference-an-existing-channel).

## ​ Configuration

### ​ Pagerduty Alert Channel Options

​

string

required

The name of your Pagerduty account.

​

string

required

The name of your service defined in Pagerduty under which the alerts should be nested.

​

string

required

The API key created by installing the Checkly integration in Pagerduty. We advise you to [install the Pagerduty alert channel first from the UI](https://app.checklyhq.com/alerts/settings/channels/new/pagerduty/) to grab the `serviceKey`.

### ​ General Alert Channel Options

These options are valid for all alert channels types.
​

boolean

Whether to send notifications when checks recover from a [failed or degraded state](https://www.checklyhq.com/docs/communicate/alerts/overview#alert-channels). Default value is `true`.

​

boolean

Whether to send notifications when checks [fail](https://www.checklyhq.com/docs/communicate/alerts/overview#alert-channels). Default value is `true`.

​

boolean

Whether to send notifications when checks [become degraded](https://www.checklyhq.com/docs/communicate/alerts/overview#alert-channels). Default value is `false`.

​

boolean

Whether to send notifications when a SSL/TLS certificate is about to expire. Default value is `false`.

```
new EmailAlertChannel("email-channel-1", {
address: "alerts@acme.com",
sslExpiry: true,
sslExpiryThreshold: 30, // Alert 30 days before expiry
})
```

[Learn more about SSL alerts.](https://www.checklyhq.com/docs/communicate/alerts/ssl-expiration)

​

number

Number of days before the SSL/TLS certificate expiry date to send notifications. Only relevant when `sslExpiry` is enabled. Default value is `30`.

```
new EmailAlertChannel("email-channel-1", {
address: "alerts@acme.com",
sslExpiry: true,
sslExpiryThreshold: 30, // Alert 30 days before expiry
})
```

[Learn more about SSL alerts.](https://www.checklyhq.com/docs/communicate/alerts/ssl-expiration)

Was this page helpful?

[Suggest edits](https://github.com/checkly/docs/edit/main/constructs/pagerduty-alert-channel.mdx)[Raise issue](https://github.com/checkly/docs/issues/new?title=Issue%20on%20docs&body=Path:%20/constructs/pagerduty-alert-channel)

[OpsgenieAlertChannel Construct Previous](https://www.checklyhq.com/docs/constructs/opsgenie-alert-channel)[IncidentioAlertChannel Construct Next](https://www.checklyhq.com/docs/constructs/incidentio-alert-channel)

[x](https://x.com/checklyhq)[github](https://github.com/checkly)[linkedin](https://linkedin.com/company/checkly)

[Powered by This documentation is built and hosted on Mintlify, a developer documentation platform](https://www.mintlify.com/?utm_campaign=poweredBy&utm_medium=referral&utm_source=checkly-422f444a)
