Alert rules
How a failed check becomes an alert: the retry threshold, the repeat interval, the four triggers, recovery, the default notification, the log and what a maintenance window holds back.
Last reviewed
On this page
An alert is a decision, and it's made per notification. This page describes what decides it: the failure count, the repeat interval, the four triggers, recovery, the log and what a maintenance window holds back. How each channel delivers a message is on the pages for email, Slack, Discord, browser push and webhooks.
How a down alert is decided
A website notification belongs to one site, and a site can have any number of them. Each one follows the same steps on its own.
- A scheduled check of the site fails. The site's failure count goes up by one. A successful check sets the count back to zero.
- If the probe regions can confirm or contradict the failure, OctoPing waits for them, for up to 10 minutes. A failure that every region contradicts sends no down alert. The vantage points page describes the verdicts.
- The notification compares the failure count with its Retry Threshold. Below the threshold, nothing is sent.
- At or above the threshold, the notification compares the time since it last sent anything with its Notification Interval. If the interval hasn't passed, nothing is sent.
- Otherwise the message goes out, and the time is stored as the notification's last sent time.
This runs on every failing check, which is how a long outage produces repeat alerts: each failing check asks the same question again, and the answer changes once the interval has passed.
Delivery settings
Both settings sit under Delivery settings in the notification form, and apply to down alerts and to heartbeat missed alerts.
| Setting | Starts as | The app accepts | What it does |
|---|---|---|---|
Retry Threshold | 3 | 1 to 10 | The number of consecutive failed checks before the first alert. |
Notification Interval (minutes) | 10 | 1 to 1440 | The shortest time between two messages from this notification while the problem continues. |
An example with the defaults
A site checked every 5 minutes, with a Retry Threshold of 3 and a Notification Interval of 10 minutes, goes down and stays down. Minute 0 is the first failed check. Check times are approximate, and the example assumes the probe regions confirm the failure.
| Minute | Failed checks in a row | What the notification does |
|---|---|---|
| 0 | 1 | No alert. 1 of 3 failures. |
| 5 | 2 | No alert. 2 of 3 failures. |
| 10 | 3 | Down alert sent. The threshold is met and nothing has been sent yet. |
| 15 | 4 | No alert. Only 5 minutes since the last one. |
| 20 | 5 | Down alert sent again. 10 minutes since the last one. |
| 25 | 6 | No alert. Only 5 minutes since the last one. |
The first alert arrives about 10 minutes after the site first fails. A longer check interval or a higher threshold moves it later by the same arithmetic.
The four triggers
Every website notification has four switches. All of them start on. Each alert type belongs to exactly one switch, and a notification with the switch off never sends that alert. The Event column is the value of the event field in a webhook payload and of the Trigger column in the notification log.
| Switch in the app | Field | Alerts it controls | Event |
|---|---|---|---|
| Site goes down | alert_on_down | Site down, Checker blocked notice, Slow response, SSL certificate expiring, Domain expiring | down, primary_blocked, slow_response, ssl_expiring, whois_expiry |
| Site recovers | alert_on_recovery | Recovered | recovered |
| Content changes | alert_on_changed | Content changed, HTTP status changed, DNS records changed, robots.txt changed, WHOIS details changed | changed, status_changed, dns_changed, robots_changed, whois_changed |
| Hosting changes | alert_on_hosting_changed | Hosting changed | hosting_changed |
The labels are shorter than what they cover. Site goes down also controls expiry and slow-response alerts, and Content changes also controls DNS, robots.txt, WHOIS and status-code alerts. Turn off Site goes down and the notification stops warning about an expiring certificate as well.
When each alert is sent
| Alert | Event | Sent when | Switch |
|---|---|---|---|
| Site down | down | The site is down and the notification's retry threshold and repeat interval allow a message. | Site goes down |
| Checker blocked notice | primary_blocked | OctoPing's own checker is refused while every probe region sees the site up. Sent once per run of failures. | Site goes down |
| Slow response | slow_response | A response takes longer than the site's Response Time Alert Threshold. | Site goes down |
| SSL certificate expiring | ssl_expiring | The certificate is still valid and has as many days left as the site's SSL alert window or fewer. | Site goes down |
| Domain expiring | whois_expiry | The domain registration has as many days left as the site's WHOIS alert window or fewer. | Site goes down |
| Recovered | recovered | The site is back after an outage that sent a down alert. | Site recovers |
| Content changed | changed | The extracted page text differs from the previous snapshot. | Content changes |
| HTTP status changed | status_changed | The status code moves from one success code to another, for example 200 to 301. | Content changes |
| DNS records changed | dns_changed | The MX or nameserver records differ from the previous check. | Content changes |
| robots.txt changed | robots_changed | The robots.txt file differs from the previous check. | Content changes |
| WHOIS details changed | whois_changed | The registrar, registrant, nameservers or domain statuses differ from the previous result. | Content changes |
| Hosting changed | hosting_changed | The network (ASN) that owns the site's address changes, or the site moves onto, off or between CDNs. | Hosting changes |
Which alerts use the threshold and the interval
downuses both, as described above.primary_blockeduses the threshold, goes out once for a run of failures and doesn't use the interval.slow_responsegoes out at the first slow response and then repeats no more often than the interval while responses stay slow. It needs a Response Time Alert Threshold on the site.ssl_expiringgoes out at most once in any 24 hours for a site, however many notifications it has.- The remaining alerts have no threshold and no interval. They go out when the check finds the change or reaches the expiry window.
Recovery alerts
- A recovery alert is sent only after a down alert was sent for the same outage. A site that failed and recovered before any notification reached its threshold sends no recovery.
- It goes to every enabled notification with Site recovers on, and it ignores the interval.
- It's sent when the first successful check arrives.
Heartbeat notifications
A heartbeat notification has two switches, and no others. Both start on.
| Switch in the app | Field | Alert | Event |
|---|---|---|---|
| Heartbeat is missed | alert_on_down | Heartbeat missed | missed |
| Heartbeat recovers | alert_on_recovery | Heartbeat recovered | recovered |
The Retry Threshold and Notification Interval work as they do for a site, with one difference in what is counted. OctoPing evaluates every heartbeat's deadline every minute and counts each evaluation that finds the ping late. With the default threshold of 3, the alert goes out on the evaluation that makes the count 3. The ping deadline itself is the heartbeat's interval plus its grace period, described on the checks page.
Maintenance windows
While a site or a heartbeat is inside a maintenance window, the alerts that report unavailability and slowness are held back. Alerts about something that planned work doesn't explain still go out.
| Held back during a window | Still sent during a window |
|---|---|
| Down alerts and their repeats, heartbeat missed alerts, HTTP status changes, slow-response alerts and the checker blocked notice. | Recovery alerts, SSL and domain expiry alerts, content, DNS, robots.txt, WHOIS and hosting change alerts, and test sends. |
- Each held-back alert is written to the log as Skipped with the error text
maintenancefor every notification that would have sent it. - An outage that already sent a down alert before the window started stays declared. Its repeat alerts are held back, and its recovery alert is sent when the site recovers, even inside the window.
- Failures during a window still count. A site that is still failing when the window ends sends its alert on the first failing check after it, as long as its threshold is already met.
The default notification
Adding a website or a heartbeat also creates a notification named Default Email Notification. It emails every member of the workspace at the moment the site is added, with a Retry Threshold of 3, a Notification Interval of 10 minutes and every switch on. It's an ordinary notification: edit it, disable it or delete it. A member who joins the workspace later isn't added to notifications that already exist.
The notification log
Every attempt is recorded. On a website, open the site, choose Notifications, then View Logs. The page shows the totals for Sent, Failed and Skipped, and a table with the columns Notification, Trigger, Status, Recipients and Error.
| Status | Meaning |
|---|---|
| Sent | OctoPing handed the message to the channel without an error. It doesn't say anyone read it. For a webhook, it means the receiving server answered with a 2xx status. |
| Failed | The channel refused the message or couldn't be reached. The Error column carries the reason. A webhook is retried first, and only its final result is logged. |
| Skipped | A maintenance window held the alert back. The Error column reads maintenance. |
The Trigger column holds the event name from the tables above, or test for a test send. Choosing Send Test on a notification bypasses the threshold, the interval and maintenance windows, and records the result the same way. Log rows are monitoring history, so they're trimmed with the workspace's other activity data to its retention period. Heartbeat notifications are logged too, but the app shows the log page for websites only.
Who can change notifications
- Viewers can see notifications and the log.
- Members, Admins and Owners can create, edit, enable, disable, delete and test them.
- Connecting Slack to the workspace takes an Admin or an Owner.
Status page contacts
Contacts added to a status page are a separate list, and they're mailed from the same decisions. A contact hears about an outage only when one of the site's notifications is about to send the down alert, so a retry threshold, a failure the probes contradicted or a maintenance window applies to contacts as well.
Related
- DocsWebhooksThe JSON payload for every website and heartbeat event, the request headers, how to verify the HMAC signature in Python, Node.js, PHP and Go, and how retries work.
- DocsVantage points and confirmationHow the primary checker and the probe regions confirm a failure, what Partial means and why OctoPing alerts when the probes are silent.
- DocsAdd your first site, alert and status pageAdd a site, get a first alert through the default email notification and publish a status page, using the app's own labels.
- FeatureWebsite alerts by email, Slack, Discord, webhook and pushChoose where alerts go, how many failures it takes to send one and how often reminders repeat. Recovery messages and a log of every attempt are included.