Alert Policies
Configure real-time notifications for traffic spikes, origin server downtime, WAF attacks, and elevated error rates.
Supported Alert Targets
Alert policies can be triggered when the following conditions are met over a sliding time window (1 to 60 minutes):
- Origin Error Rate: Percentage of 5xx status codes returned by your upstream server.
- Origin Latency: Average p95 or p99 response duration exceeding thresholds.
- DDoS Attack Triggers: Instant trigger when DDoS Shield challenges are activated.
- WAF block outbreaks: Rapid increase in request blocks matching malicious patterns.
Configuration
Link policies to communication channels (Slack Webhooks, Email notifications, PagerDuty, or custom webhook handlers).
| Param | Type | Description |
|---|---|---|
| name | string | A descriptive label for the policy. |
| metric | string | The target metric: 'error_rate', 'latency_p99', 'ddos_active', 'waf_blocks'. |
| threshold | number | The trigger value limit (e.g. 5 for 5% error rate, 2000 for 2000ms latency). |
| windowMinutes | number | The tracking evaluation window size in minutes.(default: 5) |
| channel | string | Notification channel destination: 'slack', 'email', 'webhook'. |
| channelConfig | object | Configuration parameters (e.g., Slack webhook URL, email address). |
Create alert policy
curl -X POST https://server.edgewrap.pro/v1/projects/prj_01jxyz/alerts/policies \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "High Origin Error Rate Alert",
"metric": "error_rate",
"threshold": 5,
"windowMinutes": 5,
"channel": "slack",
"channelConfig": { "webhookUrl": "https://hooks.slack.com/services/..." }
}'