---
layout: article
title: Alerts and notifications
description: Review Appwrite monitor alerts, notify organization members, and use escalations to reach the right people when an alert keeps firing.
---

An alert records one period during which a monitor's condition is met or an endpoint check is failing. Appwrite opens the alert as **Firing** and marks it **Resolved** when a check passes again. If the monitor fires again after it recovers, Appwrite opens a new alert.

# Review and acknowledge alerts

![Alerts tab with a firing executions alert today, a resolved API health check alert from yesterday, and a resolved bandwidth alert, grouped by date](/images/docs/monitors/alert-history.avif)

1. In your project, open **Observe** > **Monitors** and select the **Alerts** tab.
2. Filter by **All**, **Firing**, or **Resolved**, then select an alert to see when it started, the usage reading or check result that opened it, its peak, and how many notifications went out. For a resolved alert, you also see when it recovered.
3. For a firing alert, click **Acknowledge** to show your team that someone is handling it. The alert keeps firing until the monitor recovers. Acknowledging also stops the alert's escalation.

You can also acknowledge an alert by right-clicking it in the list, from the **Open alerts** card on the monitor's page, or from its [Console notification](#console-notifications). To revert, use **Undo acknowledgement**. Once an alert resolves, its acknowledgement can't change. The count on the **Alerts** tab only includes firing alerts that nobody has acknowledged.

Above the list, the **Alerts fired** chart counts the alerts your monitors opened, hour by hour, over the last 7 days. Pick another period from its date range.

Deleting a monitor resolves its open alert without notifying anyone, and keeps its alert history.

# Choose who gets notified

![Notifications settings of a monitor with the recipients picker open, listing the Owners and Developers roles and the On-call rotation escalation](/images/docs/monitors/recipients.avif)

Choose recipients under **Notify** when you create a monitor. To change them later, open the monitor and go to **Settings** > **Notifications** > **Recipients**. You can pick the **Owners** and **Developers** roles of your organization, or an [escalation](#escalate-an-alert).

Confirmed members in the selected roles get an email once when an alert fires, and again when it resolves. They also get a [Console notification](#console-notifications), which Appwrite updates when the alert is acknowledged or resolves. Remove every recipient to keep alerts in the Console and use their [project events](#use-project-events) without notifying anyone directly.

On Appwrite Cloud, members also get a push notification in Appwrite Beep, the Appwrite Cloud app on the [App Store](https://apps.apple.com/app/id6831213827) and [Google Play](https://play.google.com/store/apps/details?id=io.appwrite.beep). From a push, they can acknowledge, snooze, or mute an alert.

Each monitor has a **Severity** of **Info**, **Warning**, **Error**, or **Critical**. On Android, Beep rings critical alerts through silent mode.

**Cooldown** sets the minimum time between notifications for two alerts from the same monitor. If the monitor fires again within the cooldown, Appwrite records the alert and notifies your team once the cooldown ends, if the alert is still firing. Set the cooldown under **Name, cooldown** when you create a monitor, or in **Settings** > **Notifications** later.

# Console notifications

![Notifications panel with a firing outbound bandwidth alert, an acknowledged execution spike, and a resolved database reads alert under Today, and a resolved API health check under Yesterday](/images/docs/monitors/notifications.avif)

Click the bell in the Console header to open your notifications. The badge on the bell counts the ones you haven't read.

The **Inbox** tab groups notifications under **Today**, **Yesterday**, and **Earlier**. Choose **Unread** from the **All** menu to hide the ones you've read, or click the double check mark in the header to mark them all as read.

Each alert has one notification, titled **[Firing]** with the monitor and project names, and its icon shows the monitor's severity. When someone acknowledges the alert, every recipient's notification shows **Acknowledged**. When the alert resolves, the notification changes to **[Resolved]** with a green check and becomes unread again.

Click a notification to open its alert on the **Alerts** tab. To act on it without leaving the page, hover it and click the three dots, or right-click it:

- **Acknowledge** a firing alert.
- **Mark as read** or **Mark as unread**.
- **Mute project pushes** to stop Appwrite Beep pushes for the alert's project.
- **Copy** the notification's ID, title, link, or JSON, or open the alert in a new tab or window.

The **Updates** tab lists the latest [changelog](/changelog) entries and, on Appwrite Cloud, any ongoing incident or scheduled maintenance.

## Pushes and browser alerts

![Notification settings panel with Browser alerts off, Resolved alerts pushes on, and pushes turned on for the organization](/images/docs/monitors/notification-settings.avif)

The clock in the panel's header snoozes [Appwrite Beep](/docs/tooling/beep) pushes from every organization for 30 minutes, 1 hour, 4 hours, or 24 hours. While pushes are snoozed, the bell is crossed out and the panel shows when they resume.

The gear opens notification settings:

- **Browser alerts** shows a browser notification for builds and alerts while the Console is in the background.
- **Resolved alerts** sends a push when an alert stops firing.
- **Organizations** turns pushes on or off for each organization.
- **Muted projects** lists the projects you muted, with **Unmute**.

Snoozing and muting only affect pushes. Alerts keep firing, and still reach your inbox and email. These settings belong to your Appwrite account, so they also apply in Appwrite Beep on every phone you sign in on.

# Escalate an alert

![Create escalation dialog that notifies developers when an alert fires, then owners and Priya Shah 900 seconds later, and repeats once](/images/docs/monitors/escalation.avif)

An escalation notifies people in steps until someone acknowledges the alert. Escalations belong to the organization, so monitors in any of its projects can use them.

1. In your organization, open **Settings** > **Escalations** and click **Create escalation**.
2. Enter a name and add steps. For each step, choose the roles or members to notify and how many seconds to **Wait**. The first step waits from when the alert fires, and each later step from the step before it.
3. Under **Repeat**, choose how many times to run the steps again, up to 9. Each repeat starts from the first step, one monitor cooldown after the last step.
4. Click **Create**.

To use the escalation, open a monitor and go to **Settings** > **Notifications**. In **Recipients**, click **Add**, select the escalation under **Escalations**, and click **Update**. An escalation replaces the roles the monitor notified before. You can also pick an escalation under **Notify** when you create a monitor.

Appwrite follows the steps while the alert is firing, and stops when someone acknowledges the alert or it resolves. When it resolves, everyone the escalation reached hears about it. If you undo an acknowledgement while the alert is still firing, the escalation continues with the next step it hadn't sent yet.

Changing an escalation's steps only affects alerts that fire afterwards. You can't delete an escalation while a monitor uses it.

On Appwrite Cloud, the Free plan includes 1 escalation of up to 2 steps, without repeats. Pro includes 10 escalations of up to 10 steps each. Every confirmed member that an escalation step names, directly or through a role, is an on-call responder. Pro includes 3 on-call responders, and each additional responder costs $25 per month. See [Pricing](/pricing) for other plans.

# Acknowledge with a server SDK

To acknowledge alerts from your own tools, such as a chat command or an on-call integration, create an API key with the `alerts.write` scope under **Connect** > **API Keys** in your project, and call `update`. Pass `acknowledged: false` to undo an acknowledgement. An alert acknowledged with an API key has an empty `acknowledgedBy`.

```server-nodejs
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
    .setProject('<PROJECT_ID>')
    .setKey('<API_KEY>');

const alerts = new sdk.Alerts(client);

const alert = await alerts.update({
    alertId: '<ALERT_ID>',
    acknowledged: true
});
```

```server-python
from appwrite.client import Client
from appwrite.services.alerts import Alerts

client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1')
client.set_project('<PROJECT_ID>')
client.set_key('<API_KEY>')

alerts = Alerts(client)

alert = alerts.update(
    alert_id = '<ALERT_ID>',
    acknowledged = True
)
```

```server-dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
    .setProject('<PROJECT_ID>')
    .setKey('<API_KEY>');

Alerts alerts = Alerts(client);

final alert = await alerts.update(
    alertId: '<ALERT_ID>',
    acknowledged: true,
);
```

```server-php
<?php

use Appwrite\Client;
use Appwrite\Services\Alerts;

$client = (new Client())
    ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
    ->setProject('<PROJECT_ID>')
    ->setKey('<API_KEY>');

$alerts = new Alerts($client);

$alert = $alerts->update(
    alertId: '<ALERT_ID>',
    acknowledged: true
);
```

```server-ruby
require 'appwrite'

include Appwrite

client = Client.new
    .set_endpoint('https://<REGION>.cloud.appwrite.io/v1')
    .set_project('<PROJECT_ID>')
    .set_key('<API_KEY>')

alerts = Alerts.new(client)

alert = alerts.update(
    alert_id: '<ALERT_ID>',
    acknowledged: true
)
```

```server-dotnet
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;

Client client = new Client()
    .SetEndpoint("https://<REGION>.cloud.appwrite.io/v1")
    .SetProject("<PROJECT_ID>")
    .SetKey("<API_KEY>");

Alerts alerts = new Alerts(client);

Alert alert = await alerts.Update(
    alertId: "<ALERT_ID>",
    acknowledged: true
);
```

```server-deno
import { Client, Alerts } from "npm:node-appwrite";

const client = new Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
    .setProject('<PROJECT_ID>')
    .setKey('<API_KEY>');

const alerts = new Alerts(client);

const alert = await alerts.update({
    alertId: '<ALERT_ID>',
    acknowledged: true
});
```

```server-go
package main

import (
	"fmt"

	"github.com/appwrite/sdk-for-go/v7/alerts"
	"github.com/appwrite/sdk-for-go/v7/appwrite"
)

func main() {
	client := appwrite.NewClient(
		appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"),
		appwrite.WithProject("<PROJECT_ID>"),
		appwrite.WithKey("<API_KEY>"),
	)

	service := alerts.New(client)

	alert, err := service.Update(
		"<ALERT_ID>",
		true,
	)
	if err != nil {
		panic(err)
	}

	fmt.Println(alert)
}
```

```server-swift
import Appwrite

let client = Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
    .setProject("<PROJECT_ID>")
    .setKey("<API_KEY>")

let alerts = Alerts(client)

let alert = try await alerts.update(
    alertId: "<ALERT_ID>",
    acknowledged: true
)
```

```server-kotlin
import io.appwrite.Client
import io.appwrite.services.Alerts

val client = Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
    .setProject("<PROJECT_ID>")
    .setKey("<API_KEY>")

val alerts = Alerts(client)

val alert = alerts.update(
    alertId = "<ALERT_ID>",
    acknowledged = true
)
```

```server-java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.exceptions.AppwriteException;
import io.appwrite.services.Alerts;

Client client = new Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
    .setProject("<PROJECT_ID>")
    .setKey("<API_KEY>");

Alerts alerts = new Alerts(client);

try {
    alerts.update(
        "<ALERT_ID>", // alertId
        true, // acknowledged
        new CoroutineCallback<>((result, error) -> {
            if (error != null) {
                error.printStackTrace();
                return;
            }

            System.out.println(result);
        })
    );
} catch (AppwriteException e) {
    e.printStackTrace();
}
```

```server-rust
use appwrite::Client;
use appwrite::services::Alerts;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1");
    client.set_project("<PROJECT_ID>");
    client.set_key("<API_KEY>");

    let alerts = Alerts::new(&client);

    let alert = alerts.update(
        "<ALERT_ID>",
        true
    ).await?;

    println!("{:?}", alert);

    Ok(())
}
```

```http
PATCH /v1/alerts/<ALERT_ID> HTTP/1.1
Content-Type: application/json
X-Appwrite-Project: <PROJECT_ID>
X-Appwrite-Key: <API_KEY>

{
  "acknowledged": true
}
```

To read alerts, call `list` with [queries](/docs/products/databases/tablesdb/queries) or `get` with an alert ID. Both need the `alerts.read` scope. You can filter the list on `monitorId`, `name`, `status`, `severity`, `type`, `resourceType`, `resourceId`, `metric`, `escalationId`, `acknowledgedAt`, and `resolvedAt`, and use `Query.search('search', '<TERM>')` to search alert IDs, names, and metrics.

# Use project events

![Create webhook form named Alerts and subscribed to the monitors.*.alerts.*.create and monitors.*.alerts.*.update events](/images/docs/monitors/alert-webhook.avif)

Every alert is also a project event that [webhooks](/docs/apis/webhooks) and [Functions](/docs/products/functions) can subscribe to. The event carries the alert as its payload. Alert events don't reach client SDKs over Realtime.

| Event | When it fires |
| --- | --- |
| `monitors.[monitorId].alerts.[alertId].create` | The monitor starts failing and opens an alert. |
| `monitors.[monitorId].alerts.[alertId].update` | The alert resolves, is acknowledged, or has its acknowledgement undone. |

Use wildcards such as `monitors.*.alerts.*.create` to subscribe to every monitor. Project events fire on every change, whatever the cooldown.

To tell the `update` cases apart, read the alert's fields:

| Field | Value |
| --- | --- |
| `status` | `firing` or `resolved`. |
| `acknowledgedAt` | When someone acknowledged the alert, or `null`. |
| `severity` | The monitor's severity when the alert fired. |
| `metric`, `comparator`, `threshold` | A usage monitor's condition. Empty for endpoint checks. |
| `value`, `peak` | A usage monitor's latest reading, and the reading furthest past the threshold. |
| `result` | Why an endpoint check failed, such as `timeout`, `status_mismatch`, `tls_expiring`, or `rule_matched`. |
| `latency` | An endpoint check's latest response time, in milliseconds. |
| `notifications` | `1` once Appwrite announced the alert to your team. `0` if the monitor notifies no one, or while the monitor's cooldown holds the announcement back. An escalation counts once, when it starts, even if its first step waits. Later steps and the resolve notification don't count. |

## Act on alerts with a function

![Function templates filtered to the Monitoring use case: Alerts to chat, Pause on usage spike, and Uptime incident log](/images/docs/monitors/alert-templates.avif)

On the **Monitors** and **Alerts** tabs, click **Deploy an alert function** to browse the **Monitoring** function templates, or **Send alerts to a webhook** to create a webhook already subscribed to both alert events.

| Template | What it does |
| --- | --- |
| **Alerts to chat** | Posts firing and resolved alerts to Slack, Discord, Microsoft Teams, or Google Chat, which it tells apart from the webhook URL. |
| **Pause on usage spike** | Turns off the function or site that a usage monitor watches when it fires, at or above the `MIN_SEVERITY` you set. It never turns the resource back on. |
| **Uptime incident log** | Records endpoint check alerts as incidents in a table you can show on a status page, and can notify a Messaging topic. Available on Appwrite Cloud. |
