Alert Policies
Alert policies are the rules that control when an incident is created and who gets notified. Every monitor must have an alert policy attached to receive notifications.
Creating an Alert Policy
- Go to Incidents → Alert Policies
- Click New Policy
- Configure the policy settings
- Save and attach to your monitors
Policy Configuration
Trigger Settings
| Field | Default | Description |
|---|---|---|
| Failures to trigger | 2 | Consecutive failures before creating an incident |
| Successes to recover | 1 | Consecutive successes before resolving an incident |
| Notify on recovery | On | Send a notification when the incident resolves |
Failure threshold guidance:
| Threshold | Use When |
|---|---|
| 1 | Highly critical endpoints where every failure matters |
| 2 | Standard production APIs (default — filters transient blips) |
| 3 | Endpoints with acceptable brief downtime |
| 5+ | Background jobs or non-critical services |
Notification Channels
Attach one or more notification channels to a policy. Each channel will receive both the DOWN and RECOVERY notifications.
Policy: "Critical API Alerts"
│
├── Email: ops@yourcompany.com
├── Telegram: #ops-alerts channel
└── Webhook: https://hooks.yourcompany.com/pingsla
Escalation (Business / Enterprise)
If an incident is not acknowledged within the configured time, escalate to a second notification target:
| Field | Description |
|---|---|
| Escalation Delay | Minutes to wait before escalating (e.g., 15) |
| Escalation Target | Secondary channel (e.g., on-call phone via webhook → PagerDuty) |
Attaching a Policy to a Monitor
During monitor creation or by editing an existing monitor:
- Open the monitor
- Click Edit
- Under Alert Policy, select the policy
- Save
A monitor without an alert policy will still track failures but will not send notifications.
Multiple Policies — Best Practice
For a production SaaS, maintain separate policies:
| Policy | Failure Threshold | Channels | Escalation |
|---|---|---|---|
| Critical | 1 | Email + Telegram + Webhook | 10 min → On-call |
| Standard | 2 | Email + Telegram | 30 min → Team lead |
| Informational | 3 | Email only | None |
Assign Critical to: payment APIs, auth endpoints, core product APIs.
Assign Standard to: secondary APIs, dashboard, admin endpoints.
Assign Informational to: background jobs, reporting APIs.
API — Create Alert Policy
POST /v1/alert-policies
Authorization: Bearer psk_live_xxx
Content-Type: application/json
{
"name": "Critical API Alerts",
"failureThreshold": 1,
"recoveryThreshold": 1,
"notifyOnRecovery": true,
"channels": [
{ "type": "email", "target": "ops@yourcompany.com" },
{ "type": "telegram", "chatId": "-1001234567890" }
],
"escalation": {
"delayMinutes": 10,
"channels": [
{ "type": "webhook", "url": "https://hooks.yourcompany.com/oncall" }
]
}
}
API — Attach Policy to Monitor
PATCH /v1/monitors/:monitorId
Authorization: Bearer psk_live_xxx
Content-Type: application/json
{
"alertPolicyId": "pol_xxxxxxxx"
}