> ## Documentation Index
> Fetch the complete documentation index at: https://docs.happyuptime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alerts

Channels, rules, quiet hours, mute, on-call routing, and outage grouping.

# Alerts

When a monitor's confirmed status changes (`up` → `down`, `down` → `up`, or transitions through `degraded`), the alert dispatcher walks the matching rules and delivers a message to each channel.

## The model

```
monitor ──→ alert_rule ──→ alert_channel
              │
              ├── on_down / on_recovery / on_degraded toggles
              ├── quiet_hours_start / quiet_hours_end
              ├── notify_oncall (optional)
              └── oncall_schedule_id (optional)
```

A **channel** is a destination (Slack channel, Discord webhook, email, Telegram chat…). A **rule** binds one monitor to one channel and decides which events fire it.

## Channel types

| Type | What it sends |
|---|---|
| `slack_app` | Block Kit message via OAuth bot — supports buttons (Acknowledge / Resolve / Mute / Escalate) |
| `slack` | Plain incoming webhook URL — no buttons |
| `discord` | Discord webhook |
| `teams` | Microsoft Teams MessageCard via incoming webhook |
| `webhook` | Arbitrary HTTPS endpoint — HMAC-signed, auto-retried, replayable. See [Integrations → Webhooks](/integrations/webhooks) |
| `pagerduty` | Events API v2 — triggers + auto-resolves by dedup key. See [Integrations → PagerDuty](/integrations/pagerduty) |
| `opsgenie` | Alerts API — opens + closes alerts by alias. See [Integrations → Opsgenie](/integrations/opsgenie) |
| `telegram` | Bot API |
| `email` | Resend |

Use `slack_app` whenever possible — it gets the @-mentions and the interactive buttons. Plain `slack` (incoming webhook URL) is older Slack tech and lacks bidirectional features. For ops-style paging integrations (`pagerduty`, `opsgenie`, `webhook`), events like `monitor.up` and `incident.resolved` automatically resolve/close the corresponding alert downstream.

## Routing alerts to the on-call person

Set `notify_oncall: true` on a rule. When the alert fires, the dispatcher:

1. Looks up the rule's `oncall_schedule_id` (or falls back to the org's default schedule).
2. Resolves the schedule at the current moment to find the **primary** on-call user.
3. Adds an @-mention block to the Slack message using that user's `slack_id`.
4. If the schedule has a `slack_channel_id`, overrides the rule's channel so the page lands in the right room.

Read [Slack paging guide](/guides/slack-paging) for full setup.

## Quiet hours

Per-rule. Format: `HH:MM` UTC, both `quiet_hours_start` and `quiet_hours_end`. Supports overnight windows (e.g. `22:00–07:00`). Alerts during quiet hours are suppressed but logged with `status: "suppressed"`.

## Mute

Mute a monitor for a duration via dashboard or Slack (`/happyuptime mute <name> 1h`). All alerts for that monitor get logged with `status: "suppressed"` and the mute reason. Mute keys live in KV with TTL so they auto-expire.

## Outage grouping

If multiple monitors in the same org go down within 2 minutes of each other, the dispatcher annotates the alert with "Note: Other monitors also down recently: …". Helps you spot widespread issues vs. isolated failures.

## Confirmation periods

Status transitions are gated by either:
- A **count threshold** (default: 2 consecutive checks must agree) — fast and configurable per monitor
- A **time threshold** (`confirmation_period_s` / `recovery_period_s`) — wait this many seconds of consistent results before flipping state

Use time-based when your service has known flap windows (deploys, GC pauses).

## Quick links

**[Configure Slack alerts](/integrations/slack)**

OAuth install + scopes.
  **[Slack paging guide](/guides/slack-paging)**

@-mentions, buttons, on-call routing.
  **[Channels API](/api/alerts/channels)**

Programmatic channel CRUD.
  **[Rules API](/api/alerts/rules)**

Programmatic rule CRUD.