Slack & Discord Integration
Set up notifications for alerts and deployments.
Slack
Incoming Webhook
- Go to Slack Apps
- Create new app → From scratch
- Add feature: Incoming Webhooks
- Activate and create webhook for channel
- 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
- Server Settings → Integrations → Webhooks
- Create Webhook
- 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: infoEmail
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"}'