Why Webhooks?
Webhooks provide maximum flexibility:- Universal: Integrate with any system that accepts HTTP
- Customizable: Build your own alert handling logic
- Automation: Trigger workflows, scripts, or pipelines
- Integration: Connect to tools without native integrations
Use Cases
Common webhook integrations:| System | Use Case |
|---|---|
| Custom dashboards | Display alerts on internal monitoring |
| Automation platforms | Trigger Zapier, n8n, or Make workflows |
| Ticketing systems | Create tickets in Jira, Linear, etc. |
| Data pipelines | Pause pipelines on schema changes |
| Logging systems | Send alerts to Datadog, Splunk, etc. |
Prerequisites
Before you begin:- An HTTP endpoint that can receive POST requests
- AnomalyArmor account with alert configuration permissions
- (Optional) Authentication credentials for your endpoint
Setup Guide
Step 1: Navigate to Destinations
- Log in to AnomalyArmor
- Click Alerts in the left sidebar
- Select Destinations tab
- Click Add Destination
Step 2: Select Webhook
From the destination type list, click Webhook.Step 3: Configure the Webhook
| Field | Description |
|---|---|
| Destination Name | A descriptive name (e.g., “Internal Alerting System”) |
| URL | Your endpoint URL (must be HTTPS) |
| Authentication | Optional: Bearer token or API key |
| Headers | Optional: Custom HTTP headers |
Step 4: Test the Connection
Click Send Test Alert to verify your endpoint receives the payload:Step 5: Save
Click Save to complete the setup. Your webhook destination is now ready to use in alert rules.Payload Format
AnomalyArmor sends a JSON payload for each alert:Event Types
| Event Type | Description |
|---|---|
schema_change | Column, table, or constraint changes |
freshness_violation | Table exceeded freshness SLA |
discovery_complete | Discovery job finished |
connection_failed | Database connection issue |
Authentication
Bearer Token
Add anAuthorization header with your token:
API Key Header
Add a custom header with your API key:HMAC Signature
AnomalyArmor includes anX-AnomalyArmor-Signature header with each request. Verify this signature to ensure the request came from AnomalyArmor:
Retry Logic
AnomalyArmor retries failed webhook deliveries:| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 15 minutes |
| 5 | 1 hour |
Best Practices
Endpoint Design
- Respond quickly (< 5 seconds) to avoid timeouts
- Return 200 for successful receipt, even if processing is async
- Use a queue for heavy processing
- Log incoming payloads for debugging
Security
- Always use HTTPS endpoints
- Verify the
X-AnomalyArmor-Signatureheader - Rotate authentication tokens periodically
- Allowlist AnomalyArmor IP addresses if needed
Error Handling
Your endpoint should handle:- Duplicate alerts (use
alert.idfor deduplication) - Unknown event types (ignore gracefully)
- Missing fields (use defaults)
Troubleshooting
”Connection refused” or timeout
Cause: Endpoint unreachable or slow. Fix:- Verify the URL is correct and accessible
- Check firewall rules allow AnomalyArmor IPs
- Ensure endpoint responds within 30 seconds
”401 Unauthorized”
Cause: Authentication failed. Fix:- Verify the token/API key is correct
- Check the header name matches your endpoint’s expectation
- Ensure credentials haven’t expired
”400 Bad Request”
Cause: Endpoint rejected the payload. Fix:- Check endpoint logs for specific error
- Verify endpoint accepts
application/json - Test with a simple endpoint first
Next Steps
Alert Rules
Create rules that route to webhooks
API Reference
Build integrations with the API
