Notifications
CHAD can notify external systems when alerts fire. This guide covers webhook configuration for Slack, Discord, and custom endpoints.Webhook Overview
Webhooks send HTTP POST requests when events occur:- Alert fired - New detection triggered
- Alert status changed - Status updated
- System events - Health alerts, rule changes
Configuring Webhooks
Create a Webhook
- Navigate to Settings > Notifications
- Click Add Webhook
- Configure the webhook
- Save and test
Webhook Settings
| Setting | Description | Required |
|---|---|---|
| Name | Friendly name | Yes |
| URL | Webhook endpoint | Yes |
| Format | Payload format (JSON, Slack, Discord) | Yes |
| Events | Which events trigger the webhook | Yes |
| Headers | Custom HTTP headers | No |
| Secret | Signing secret for verification | No |
Payload Formats
JSON (Generic)
Standard JSON payload for custom integrations:Slack Format
Formatted for Slack incoming webhooks:Discord Format
Formatted for Discord webhooks:Setting Up Slack
Create Incoming Webhook
- Go to your Slack workspace settings
- Navigate to Apps > Manage > Custom Integrations
- Click Incoming Webhooks
- Click Add to Slack
- Choose a channel
- Copy the webhook URL
Configure in CHAD
- Add webhook with Slack URL
- Select Slack format
- Choose events to notify
- Test the webhook
Setting Up Discord
Create Webhook
- Open Discord server settings
- Go to Integrations > Webhooks
- Click New Webhook
- Name it and choose channel
- Copy the webhook URL
Configure in CHAD
- Add webhook with Discord URL
- Select Discord format
- Choose events
- Test
Per-Rule Notifications
Disable Webhook per Rule
Some rules may be too noisy for notifications:- Open the rule
- Click Settings
- Disable Send to webhook
- Save
Severity Filtering
Configure webhooks to only fire for certain severities:- Edit the webhook
- Set Minimum Severity
- Only alerts at or above this level trigger notifications
Custom Headers
For authenticated endpoints:Webhook Signing
Verify webhook authenticity with HMAC signing:- Set a Secret in webhook config
- CHAD includes
X-CHAD-Signatureheader - Verify signature in your endpoint
Retry Logic
Failed webhooks are retried:| Attempt | Delay |
|---|---|
| 1st retry | 30 seconds |
| 2nd retry | 2 minutes |
| 3rd retry | 10 minutes |
| Final retry | 1 hour |
Event Types
| Event | Description |
|---|---|
alert.created | New alert fired |
alert.status_changed | Alert status updated |
alert.comment_added | Comment added to alert |
rule.deployed | Rule deployed |
rule.undeployed | Rule undeployed |
health.alert | Health threshold exceeded |
system.error | System error occurred |
Testing Webhooks
Before relying on webhooks:- Click Test on the webhook
- CHAD sends a test payload
- Verify receipt in your system
Monitoring Webhooks
View webhook delivery status:- Go to Settings > Notifications
- Click the webhook
- View Delivery Log
- See success/failure history
Troubleshooting
Webhook not firing
- Check webhook is enabled
- Verify event type is selected
- Check rule has notifications enabled
- Review delivery log for errors
Authentication errors
- Verify URL is correct
- Check custom headers
- Test endpoint with curl
Timeout errors
- Your endpoint may be slow
- Webhook timeout is 30 seconds
- Optimize your endpoint
Invalid payload
- Check format matches endpoint expectations
- Try generic JSON format
- Verify field mappings
Best Practices
Use severity filtering
Use severity filtering
Don’t send low-severity alerts to high-visibility channels.
Test before production
Test before production
Always test webhooks before relying on them.
Monitor delivery
Monitor delivery
Regularly check delivery logs for failures.
Use signing
Use signing
Enable webhook signing for security.