Skip to main content
For general information about alerting, see our docs on Slack alerts and alerting with Checkly.
Sends alert notifications to a Slack channel via an incoming webhook.
import { SlackAlertChannel } from 'checkly/constructs'

const slackChannel = new SlackAlertChannel('slack-channel-1', {
  url: new URL('https://hooks.slack.com/services/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'),
  channel: '#ops'
})
If you need to reference existing alert channels that were created outside of your CLI project, use fromId().

Configuration

Configure Slack-specific settings:
ParameterTypeRequiredDefaultDescription
urlURL-Slack incoming webhook URL
channelstring-Target Slack channel (e.g., ‘#ops’, ‘@user’)

Slack Alert Channel Options

url
URL
required
The Slack incoming webhook URL where Checkly will send alert notifications.
new SlackAlertChannel('slack-channel-1', {
  url: new URL('https://hooks.slack.com/services/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'),
  channel: '#ops'
})
channel
string
Target Slack channel or user for notifications. You can specify the target channel to override the default channel configured in the webhook.

General Alert Channel Options

These options are valid for all alert channels types.
sendRecovery
boolean
Whether to send notifications when checks recover from a failed or degraded state. Default value is true.
sendFailure
boolean
Whether to send notifications when checks fail. Default value is true.
sendDegraded
boolean
Whether to send notifications when checks become degraded. Default value is false.
sslExpiry
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.
sslExpiryThreshold
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.