Skip to main content

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

  1. Go to Incidents → Alert Policies
  2. Click New Policy
  3. Configure the policy settings
  4. Save and attach to your monitors

Policy Configuration

Trigger Settings

FieldDefaultDescription
Failures to trigger2Consecutive failures before creating an incident
Successes to recover1Consecutive successes before resolving an incident
Notify on recoveryOnSend a notification when the incident resolves

Failure threshold guidance:

ThresholdUse When
1Highly critical endpoints where every failure matters
2Standard production APIs (default — filters transient blips)
3Endpoints 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:

FieldDescription
Escalation DelayMinutes to wait before escalating (e.g., 15)
Escalation TargetSecondary channel (e.g., on-call phone via webhook → PagerDuty)

Attaching a Policy to a Monitor

During monitor creation or by editing an existing monitor:

  1. Open the monitor
  2. Click Edit
  3. Under Alert Policy, select the policy
  4. 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:

PolicyFailure ThresholdChannelsEscalation
Critical1Email + Telegram + Webhook10 min → On-call
Standard2Email + Telegram30 min → Team lead
Informational3Email onlyNone

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"
}