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).

ParamTypeDescription
namestringA descriptive label for the policy.
metricstringThe target metric: 'error_rate', 'latency_p99', 'ddos_active', 'waf_blocks'.
thresholdnumberThe trigger value limit (e.g. 5 for 5% error rate, 2000 for 2000ms latency).
windowMinutesnumberThe tracking evaluation window size in minutes.(default: 5)
channelstringNotification channel destination: 'slack', 'email', 'webhook'.
channelConfigobjectConfiguration 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/..." }
  }'