Skip to content

Slack & Discord Integration

Set up notifications for alerts and deployments.

Slack

Incoming Webhook

  1. Go to Slack Apps
  2. Create new app → From scratch
  3. Add feature: Incoming Webhooks
  4. Activate and create webhook for channel
  5. Copy webhook URL

Configuration

yaml
integrations:
  slack:
    enabled: true
    webhook_url: https://hooks.slack.com/services/xxx/yyy/zzz
    channels:
      alerts: "#ops-alerts"
      deployments: "#deployments"
    mention:
      critical: "@here"
      warning: ""

Message Format

json
{
  "channel": "#ops-alerts",
  "attachments": [{
    "color": "danger",
    "title": "🚨 Alert: High CPU Usage",
    "text": "Service `api-gateway` CPU at 95%",
    "fields": [
      {"title": "Service", "value": "api-gateway", "short": true},
      {"title": "Severity", "value": "Critical", "short": true}
    ]
  }]
}

Discord

Webhook Setup

  1. Server Settings → Integrations → Webhooks
  2. Create Webhook
  3. Copy webhook URL

Configuration

yaml
integrations:
  discord:
    enabled: true
    webhook_url: https://discord.com/api/webhooks/xxx/yyy
    username: "Ops Atlas"
    avatar_url: "https://opsatlas.io/logo.png"

PagerDuty

yaml
integrations:
  pagerduty:
    enabled: true
    integration_key: your-integration-key
    severity_mapping:
      critical: critical
      warning: warning
      info: info

Email

yaml
integrations:
  email:
    enabled: true
    smtp:
      host: smtp.gmail.com
      port: 587
      secure: true
      auth:
        user: alerts@example.com
        pass: ${SMTP_PASSWORD}
    from: "Ops Atlas <alerts@example.com>"
    recipients:
      critical: ["oncall@example.com", "team@example.com"]
      warning: ["team@example.com"]

Testing

Test notifications:

bash
# Via UI: Settings → Integrations → Test
# Via API:
curl -X POST "$OPSATLAS_URL/api/v1/integrations/test" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"type": "slack", "message": "Test notification"}'

Released under the MIT License.