Guides

Notification Channels

How to create and manage notification channels for Slack, email, and webhook alerts.

Notification Channels

Notification channels define where alerts are sent. Yorker supports three channel types: Slack, email, and webhook. Channels are shared across your team and can be referenced by any alert rule or SLO.

Channel Types

Slack

Posts alert notifications to a Slack channel via an incoming webhook.

alertChannels:
  ops-slack:
    type: slack
    webhookUrl: "{{secrets.SLACK_WEBHOOK_URL}}"

To set up a Slack webhook, create an Incoming Webhook in your Slack workspace and use the generated URL.

Email

Sends alert notifications to one or more email addresses.

alertChannels:
  on-call-email:
    type: email
    addresses:
      - [email protected]
      - [email protected]

At least one address is required.

Webhook

Sends an HTTP request to any URL. Use this for PagerDuty, Opsgenie, custom integrations, or any service that accepts webhooks.

alertChannels:
  pagerduty:
    type: webhook
    url: "{{secrets.PAGERDUTY_WEBHOOK_URL}}"
    method: POST
    headers:
      Authorization: "Token token={{secrets.PD_TOKEN}}"
FieldDefaultDescription
url(required)Webhook endpoint URL.
methodPOSTHTTP method.
headers(none)Optional headers for authentication.

Create channels in the Web UI

  1. Navigate to Settings > Notification Channels.
  2. Click Create Channel.
  3. Select the channel type (Slack, Email, or Webhook).
  4. Fill in the required fields.
  5. Click Save.

Channels created in the UI and via the CLI are the same underlying resource. The CLI's yorker deploy detects and diffs against channels created through the UI.

Define channels in YAML

Add an alertChannels block at the top level of yorker.config.yaml:

alertChannels:
  ops-slack:
    type: slack
    webhookUrl: "{{secrets.SLACK_WEBHOOK_URL}}"

  on-call-email:
    type: email
    addresses:
      - [email protected]

  pagerduty:
    type: webhook
    url: "{{secrets.PAGERDUTY_WEBHOOK_URL}}"
    method: POST
    headers:
      Authorization: "Token token={{secrets.PD_TOKEN}}"

Reference channels in alerts

Use the @channel-name syntax to attach a channel to an alert rule:

monitors:
  - name: API Health
    type: http
    url: https://api.example.com/health
    alerts:
      - conditions:
          - type: consecutive_failures
            count: 3
        channels:
          - "@ops-slack"
          - "@on-call-email"

Reference channels in SLOs

SLOs can also reference channels for burn rate alerts:

slos:
  - name: API Availability
    monitor: API Health
    target: "99.9%"
    window: 30d
    channels:
      - "@ops-slack"

Deploy ordering

When you run yorker deploy, channels are created/updated before alerts and SLOs (phase 0), and deleted after all references are removed (phase Z). This ensures channels always exist when alerts or SLOs reference them.

Manage channels via API

Channels can also be managed through the REST API. See the REST API reference for endpoints.