# RootlyAlertChannel Construct - Checkly Docs

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

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

---

Back to top
- Configuration Rootly alert channel options
- General alert channel options

Alert Channels

# RootlyAlertChannel Construct

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

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

Sends alerts to a Rootly service, team or escalation policy.

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

const rootlyChannel = new RootlyAlertChannel('rootly-channel-1', {
name: 'ACME alerts',
url: 'https://webhooks.rootly.com/webhooks/incoming/checkly_webhooks/notify/Service/xxxxx',
secret: 'xxxxx45afe73'
})
```

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

const rootlyChannel = new RootlyAlertChannel('rootly-channel-1', {
name: 'ACME alerts',
url: 'https://webhooks.rootly.com/webhooks/incoming/checkly_webhooks/notify/EscalationPolicy/xxxxx',
secret: 'xxxxx45afe73',
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).

Since CLI v10.5.0, if your plan doesn’t include Rootly, `checkly validate`, `checkly test` and `checkly deploy` refuse this channel. See [Integrations not included in your plan](https://www.checklyhq.com/docs/constructs/alert-channel#integrations-not-included-in-your-plan).

## Configuration

### Rootly alert channel options

string

required

Friendly name to recognise the integration.

URL | string

required

The Rootly webhook URL: `https://webhooks.rootly.com/webhooks/incoming/checkly_webhooks/notify/ / `. Replace ` ` with `Service` for a service, `Group` for a team or `EscalationPolicy` for an escalation policy, and ` ` with the ID of the target in Rootly.

string

required

The secret of the Checkly alert source in Rootly. Checkly sends it in the `secret` header of each request.

string

The payload sent to the target URL when an alert is triggered. If you leave it out, Checkly sends a default payload with the alert type, check details and a link to the result. You can build a custom payload with [Handlebars helpers and variables](https://www.checklyhq.com/docs/integrations/alerts/webhooks/#using-variables). Here’s an example payload, using the default one that we provide:

```
new RootlyAlertChannel('rootly-channel-1', {
name: 'ACME alerts',
url: 'https://webhooks.rootly.com/webhooks/incoming/checkly_webhooks/notify/Service/xxxxx',
secret: 'xxxxx45afe73',
payload: `
{
"alert_type": "{{ALERT_TYPE}}",
"check_id": "{{CHECK_ID}}",
"check_result_id": "{{CHECK_RESULT_ID}}",
"check_name": "{{CHECK_NAME}}",
"alert_title": "{{ALERT_TITLE}}",
"started_at": "{{STARTED_AT}}",
{{#if AI_ANALYSIS_CLASSIFICATION}}
"ai_classification": "{{AI_ANALYSIS_CLASSIFICATION}}",
"ai_root_cause": "{{AI_ANALYSIS_ROOT_CAUSE}}",
"ai_link": "{{AI_ANALYSIS_LINK}}",
{{/if}}
"link": "{{RESULT_LINK}}"
}
`
})
```

### General alert channel options

These options are valid for all alert channels types.
boolean

Whether to send notifications when checks [recover](https://www.checklyhq.com/docs/communicate/alerts/overview#when-are-recovery-alerts-sent) from a failed or degraded state. Degraded recoveries (`ALERT_DEGRADED_RECOVERY`) also need `sendDegraded`. 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/rootly-alert-channel.mdx)[Raise issue](https://github.com/checkly/docs/issues/new?title=Issue%20on%20docs&body=Path:%20/constructs/rootly-alert-channel)

[TelegramAlertChannel Construct Previous](https://www.checklyhq.com/docs/constructs/telegram-alert-channel)[Coralogix Alert Channel Next](https://www.checklyhq.com/docs/constructs/coralogix-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)
