# Email notifications Source: https://docs.alertee.io/alerts/notifications Control which emails you receive, and unsubscribe from any of them. Alertee sends you email for two things: **check alerts** (a check you're subscribed to fired or recovered) and **incident comments** (someone commented on an incident you're subscribed to). Every person on an alert group's email recipients gets these — including yourself for comments you post. These settings are **personal to you** and scoped to the current workspace. Changing them never affects your teammates. ## Manage your notifications Go to **Settings → Notifications** (marked "Just you"). Each row — **All notifications**, **Check alerts**, and **Incident comments** — has two controls: * The **switch** turns that category on or off. Off = muted until you turn it back on (nothing is lost). * The **clock** snoozes it for a few hours (1, 3, or 24) — a timed mute that auto-expires. While snoozed, the row shows "Snoozed until …". Both take effect immediately and are personal to you. ## Snooze or mute straight from an alert You don't have to wait for an email to quiet a noisy check. Open the incident in the **Inbox** and use the **…** menu next to **Resolve incident**. It offers two scopes: * **Quiet for everyone** — snooze the check (1h/3h/24h or until tomorrow) or mute its alerts for the whole team. This is the same check-level snooze/mute you'll find on the Checks list. * **Just me** — snooze or mute *this check's* emails to you only, without affecting your teammates' alerts. Resume anytime from the same menu or under **Settings → Notifications**. ## Unsubscribe from an email Every alert and comment email has an **Unsubscribe** link in the footer, plus a one-click `List-Unsubscribe` header that mail clients (Gmail, Outlook, Apple Mail) surface as a native unsubscribe button. The footer link opens a page where you can **snooze for a few hours** or **unsubscribe for good** — both suppress that category (alerts or comments) for your address in that workspace. The native one-click button mutes it. Re-enable anytime under **Settings → Notifications**. > [!NOTE] > > Unsubscribing only affects **email**. Slack and webhook delivery for an alert > group are unchanged — those are shared team channels, not personal inboxes. ## How suppression works Suppression is keyed by **email address + workspace + category** (optionally scoped to a single check for "just me" mutes), so it works for external recipients (addresses that aren't Alertee users) too — they unsubscribe via the email link, with no account required. A snooze stores an expiry and lifts itself automatically; a mute has none and stays until you turn it back on. A paused, snoozed, or unsubscribed recipient is simply skipped at send time; the rest of the alert group still receives the alert. # Alert groups Source: https://docs.alertee.io/alerts/overview How Alertee routes a check's alerts to recipients. When a check fails, Alertee sends the alert to an **alert group**. An alert group is a named set of **recipients** — webhooks, Slack channels, and email lists. Each check routes to exactly one group; checks with none set use the organization's **default** group. ``` Check ──routes to──> Alert group ──delivers via──> Recipients ├─ webhook (URL) ├─ slack channel └─ email group ──> emails / org members ``` ## The three pieces * **Alert group** — the routing target. A check's `alert_group_id` points at one. Create them per team, per severity, per project — however you want to fan out. * **Recipient (channel)** — a delivery destination attached to a group: a **webhook** (`{ url }`), a **Slack** channel, or an **email group**. * **Email group** — a reusable list of email recipients (external addresses or organization members). Attach the same list to multiple alert groups. ## The default group Every organization starts with a **Default Alert Group** and an **All Organization Members** email group (which auto-includes everyone in the org). Checks that don't specify a group fall back to the default, so alerts reach your team out of the box. ## When notifications are sent For each incident, Alertee sends notifications at three points in its lifecycle: 1. **First alert** — when the check first fails (after any [grace period](/checks/grace-periods) you've configured). 2. **Reminders** — while the check keeps failing, a reminder goes out on an interval (default **every 60 minutes**, capped at 24 per incident). Reminders are labelled with how long the check has been failing. 3. **Recovery** — when the check passes again, a single **Resolved** notification closes the loop on the same channels, and the incident is auto-resolved in the inbox. You won't get one email per failed run by default — a check on a 1-minute interval that's down for an hour sends the first alert plus hourly reminders, not 60 emails. The cadence is controlled by your organization's **notification mode**: | Mode | Behaviour | | - | - | | `first_and_reminders` (default) | First alert, then reminders on the configured interval | | `all` | A notification on **every** failing run | | `first_only` | One alert per incident, nothing more until recovery | | `none` | No automatic notifications | The reminder interval and per-incident cap are configurable alongside the mode in your organization's issue settings. ## Set it up from the CLI ```bash theme={null} # A group that POSTs to a webhook alertee alert-groups create "Acme oncall" alertee alert-groups add-webhook "Acme oncall" --url https://hooks.example.com/abc # A group that emails a list alertee email-groups create "Acme emails" --email alice@acme.com --email bob@acme.com alertee alert-groups add-email-group "Acme oncall" --email-group "Acme emails" # Route a check to it, and send a test alertee checks create --name "Orders (5m)" --connection "Acme prod" \ --query "SELECT COUNT(*) FROM orders WHERE created_at > now() - interval '5 minutes'" \ --condition greater_than --threshold 0 --interval five_minutes \ --alert-group "Acme oncall" alertee alert-groups test "Acme oncall" ``` See the [CLI commands](/cli/commands) for the full `alert-groups` and `email-groups` reference, or drive the same actions from an AI assistant with the [MCP tools](/mcp/tools) (`create_alert_group`, `add_alert_recipient`, `create_email_group`, …). > [!NOTE] > > Slack recipients are set up in the web UI — they need a connected Slack > workspace (OAuth). Webhooks and email groups work entirely from the CLI/MCP. ## The webhook payload A **webhook** recipient receives a JSON `POST` when a check fails. Use it to wire alerts into anything — a chat bot, an incident tool, or an **AI coding agent** (POST the payload straight to Devin's `/v1/sessions`, a GitHub Action, or a Zapier hook to open an investigation automatically). Every payload carries this metadata: ```json theme={null} { "alert_id": "…", "timestamp": "2026-06-08T12:00:00Z", "check_id": "…", "check_name": "Orders (5m)", "status": "failure", "alert_level": "warning", "message": "Check condition failed: …", "description": "…", "org_id": "…", "data_timestamp": "2026-06-08T11:59:00Z", "issue_id": "…", "advisory_summary": "AI diagnosis of the failure, when ready" } ``` Recovery notifications POST the same shape with `"status": "success"` and `"alert_level": "resolved"` — match on those to auto-close incidents in your tooling. Some fields are **best-effort** and only appear when available: `advisory_summary` once the AI diagnosis lands, and `current_value` / `threshold_value` when the triggering path computed them. Two more are **gated per check** (below): `sql_query` and `result_rows`. ### What each check reveals (payload config) The `sql_query` and `result_rows` fields are **gated per check**, because they can leak schema or actual data: * **`sql_query`** — the check's query. **Included by default** (an agent needs the source to act on). * **`result_rows`** — the raw failing rows, capped at **`max_rows`** (default 20\). **Off by default** — rows may contain sensitive or PII data, so this is opt-in. Core metadata (name, status, level, message) is always sent. The conservative default — query on, rows off — applies to every check unless you change it. `include_query` only affects **SQL** checks (http, heartbeat, and push checks have no SQL query to send). Set it per check in the **Alerts** step of the check form, or from the CLI / MCP: ```bash theme={null} # Create a check that also sends the failing rows (max 50) to webhooks alertee checks create --name "Empty feeds" --connection "Acme prod" \ --query "SELECT name, value FROM feed_counts" --grid --evaluation-type all_cells \ --condition greater_than --threshold 0 --interval five_minutes \ --include-rows --max-rows 50 # Stop sending the SQL query for an existing check alertee checks update "Empty feeds" --exclude-query ``` From the MCP tools, `create_check` / `update_check` take `include_query`, `include_result_rows`, and `max_rows`; `get_check` echoes the effective `webhook_payload_config`. # Plans & billing Source: https://docs.alertee.io/billing/overview What each plan includes, how limits work, and how to upgrade. ## Plans | | Free | Starter | Team | | - | - | - | - | | **Price** | \$0 | \$29/mo | \$99/mo | | **Checks** | 5 | 25 | 500 | | **Connections** | 2 | 5 | 50 | | **Minimum interval** | 15 min | 5 min | 1 min | Every plan includes AI-assisted setup, PostgreSQL & ClickHouse connections, and the [Inbox](/inbox/overview). ## How limits work * **Checks** — the number of checks in the organization. When you hit the limit, creating another is blocked until you upgrade or delete one. * **Connections** — the number of database connections (data sources). * **Minimum interval** — the fastest schedule a check can run on. A 1-minute check needs the Team plan. Limits are per **organization**, not per user. ## Upgrading & managing your subscription Go to **Settings → Billing**. * **Upgrade to Starter / Team** — opens Stripe checkout. After payment you're returned to the app and the new limits apply immediately. * **Manage subscription** — opens the Stripe customer portal to update your card, change plan, or cancel. * **Downgrade to Free** — available from the portal. If you're over the Free limits after downgrading, existing checks keep running, but you can't create new ones until you're back under the limit. The usage bars at the top of the same section show how many checks and connections you've used against your plan. ## AI agent generations Letting Alertee's agent author or review a [managed check](/checks/managed) uses a daily generation allowance, separate from your check and connection limits: | Plan | Agent generations / day | | - | - | | Free | 2 | | Starter & Team | 10 | Running existing checks never counts against this — only authoring and scheduled reviews do. # API metric checks Source: https://docs.alertee.io/checks/api-metrics Track a number from any JSON API — usage, spend, queue depth — and alert on thresholds. An API metric check fetches a JSON API on your interval, extracts a value with a **value path**, and evaluates it against a [condition](/checks/conditions). The extracted value is stored on every run, so the check's overview graphs it over time — you get a usage/spend chart for free, plus alerts when it crosses your threshold. ## How it works 1. Alertee requests your `url` (with any `headers` and `body` you configure). 2. The response must be JSON; the `value_path` picks the metric out of it. 3. The value flows through the same condition engine as a SQL single-value check: `greater_than`, `less_than`, `between`, `equals`, and the rest. 4. Each run's value is recorded — open the check to see the trend chart. With no condition, the check simply verifies the API responds and the value extracts — useful while you're exploring an API. ## Value paths Value paths use [gjson syntax](https://github.com/tidwall/gjson#path-syntax): dot-separated keys with numeric array indexes. | Response | Path | Extracts | | - | - | - | | `{"usage": {"total": 1234}}` | `usage.total` | `1234` | | `{"data": [{"count": 5}]}` | `data.0.count` | `5` | | `42` | *(blank)* | `42` | ### Grid metrics If the path yields an **array of `{name, value}` objects**, the check becomes a [grid check](/checks/conditions#checking-each-row) — one cell per dimension, with `evaluation_type` conditions like `all_cells` and `dimension_missing`. Reshape arbitrary arrays with gjson aliasing: ```text theme={null} days.#.{name:date,value:minutes} ``` turns `{"days": [{"date": "2026-06-10", "minutes": 10}, …]}` into one cell per day. ## Authentication Put your API token in a request header: ```json theme={null} { "Authorization": "Bearer " } ``` Use a **scoped, read-only token** where the provider supports it, and rotate it like any other credential. Header values are masked everywhere they're read back — the app, the CLI, and the MCP `get_check`/`list_checks` all show `••••••` instead of the token. Editing a check preserves the stored token; the mask is never saved over it. (If you save a header whose value is literally the `••••••` placeholder — e.g. an agent that only ever saw the masked value — the write is rejected so a real token is never silently replaced. Pass the real token.) ## Query parameters (HTTP-SQL, Tinybird) Some APIs — Tinybird and other HTTP-SQL endpoints — take their input as a URL query parameter, e.g. a SQL statement in `?q=…`. Pass these as **`query_params`** and Alertee URL-encodes them for you, so you never hand-encode a query string: ```bash theme={null} alertee checks create --type api_metric --name "Events ingested (1h)" \ --url "https://api.tinybird.co/v0/sql" \ --query-param "q=SELECT count() AS value FROM events WHERE inserted_at > now() - interval 1 hour" \ --header "Authorization: Bearer $TINYBIRD_TOKEN" \ --value-path "data.0.value" \ --condition greater_than --threshold 0 --interval hourly ``` Tinybird returns `{ "data": [ { "value": 1234 } ] }`, so `data.0.value` extracts the count. For a per-dimension (grid) check, alias the `data` array into `{name,value}` rows with a value path like `data.#.{name:dimension,value:metric}`. ## Example: alert when cloud spend runs away Say your provider exposes a usage endpoint that returns month-to-date consumption. To alert before the bill surprises you: ```bash theme={null} alertee checks create --type api_metric --name "Compute usage (month)" \ --url "https://api.your-provider.com/v1/usage" \ --http-method POST --request-body '{}' \ --header "Authorization: Bearer $PROVIDER_TOKEN" \ --value-path "total.computeMinutes" \ --condition less_than --threshold 50000 --interval hourly ``` The condition describes the **healthy** state — here, under 50,000 minutes this month. The check alerts once usage crosses it, and the overview chart shows the month's burn as it accumulates. The same pattern works for any JSON API: SaaS usage and billing endpoints, queue depths, error counters, your own internal admin APIs. > [!NOTE] > > **Connect/gRPC-style APIs** work too — they accept JSON over POST (hence > `--http-method POST --request-body '{}'`) and respond with proto3 JSON, where > field names are camelCase and large integers arrive as strings. Alertee > converts numeric strings to numbers automatically, so conditions and the chart > behave as expected. ## Configuration reference | Field | Required | Meaning | | - | - | - | | `url` | yes | JSON API endpoint to fetch | | `value_path` | recommended | gjson path to the metric (blank = response body is the value) | | `headers` | no | Request headers (auth tokens) | | `http_method` | no | Default `GET`; use `POST` for Connect/gRPC-style APIs | | `body` | no | Request body, sent as JSON | | `expected_status` | no | Healthy status code (default: any 2xx) | | `timeout_seconds` | no | Request timeout (default 30) | | `query_params` | no | URL query params, URL-encoded and appended for you (e.g. Tinybird `q`) | Available from the **app** (check type "API metric"), the [CLI](/cli/commands) (`--type api_metric`), and the [MCP server](/mcp/tools) (`create_check` with `check_type: "api_metric"`). ## Previewing the response Before saving, probe the endpoint to see its shape and the paths you can extract — no need to `curl` first. It runs the request and lists every gjson leaf path: ```bash theme={null} alertee checks preview-api \ --url "https://api.tinybird.co/v0/sql" \ --query-param "q=SELECT count() AS value FROM events" \ --header "Authorization: Bearer $TINYBIRD_TOKEN" ``` ```text theme={null} HTTP 200 in 142ms Extractable paths (use one as --value-path): data.0.value = 1234 rows = 1 ``` Pass `--value-path` to confirm exactly what a path extracts. The same capability is the MCP `preview_api_metric` tool — handy when an agent is authoring a check. # Check types Source: https://docs.alertee.io/checks/check-types SQL, website/API, API metric, heartbeat, and push checks. Alertee runs five kinds of check. Every type shares the same interval, schedule, grace period, and alert-group settings — they differ only in **what** they watch. ## SQL check (default) Runs a SQL query against a [connection](/checks/overview#connections) and evaluates the result against a [condition](/checks/conditions). Single-value or [grid](/checks/conditions#checking-each-row). This is the default when no type is given. ## Website / API check (`http`) Requests a URL on your interval and alerts if it stops behaving. No database connection needed. Configure: | Option | What it checks | | - | - | | `url` | The URL to request (required) | | `http_method` | GET (default), HEAD, POST, PUT, PATCH, DELETE | | `expected_status` | Status code that means healthy (default: any 2xx) | | `timeout_seconds` | Request timeout (default 30) | | `max_response_time_ms` | Alert if the response is slower than this | | `body_contains` | Alert unless the response body contains this string | | `ssl_expiry_days` | For `https`, alert if the TLS certificate expires within this many days | ## API metric check (`api_metric`) Fetches a JSON API on your interval, extracts a **number** from the response, and evaluates it against a [condition](/checks/conditions) — exactly like a SQL single-value check, including the value graph on the check's overview. Use it to track SaaS usage, spend, queue depths, or any metric a provider exposes over HTTP. See [API metric checks](/checks/api-metrics) for the full guide. | Option | What it does | | - | - | | `url` | The JSON API endpoint to fetch (required) | | `value_path` | Path to the metric in the response, e.g. `usage.total` (blank = the body is the value) | | `headers` | Request headers — put your API token here | | `http_method` / `body` | Method (default GET) and request body for POST-style APIs | | `expected_status` | Status code that means healthy (default: any 2xx) | | `timeout_seconds` | Request timeout (default 30) | ## Heartbeat check (`heartbeat`) A **dead-man's-switch** for a cron job, ETL pipeline, or any scheduled task. Instead of Alertee reaching out, your job calls a private **ping URL** when it finishes successfully. If a ping doesn't arrive in time, the check alerts. Configure: | Option | Meaning | | - | - | | `expected_interval_mins` | Alert if no ping arrives within this many minutes (default 60) | | `grace_period_mins` | Extra minutes to wait past the interval before alerting | | `last_ping_status_to_require` | Required status of the latest ping (default `success`) | When you create the check, Alertee returns a ping URL like `https://api.alertee.app/heartbeat/`. Call it on success — for example at the end of a cron job: ```bash theme={null} # your job's work here… curl -fsS https://api.alertee.app/heartbeat/ ``` A `GET` or `POST` both count as a ping. POST a JSON body (`{"status":"failure","message":"…"}`) to report a failed run explicitly. ## Push check (`push`) The one type where **you** send us the number. Your own cron, script, or CI step POSTs a value to a private ingest URL; the value is evaluated against a [condition](/checks/conditions) — single-value or grid — the instant it arrives. No database credentials, and it works from inside a private network. A staleness window doubles as a dead-man switch, so silence alerts too. | Option | Meaning | | - | - | | `staleness_mins` | Alert if no value is pushed within this many minutes (default 60) | ```bash theme={null} # your job's work here… curl -fsS -X POST https://api.alertee.app/ingest/ \ -H 'Content-Type: application/json' \ -d '{"value": 42}' ``` Post `{"rows": [{"name": "eu-west", "value": 12}]}` instead to push a grid — one row per dimension. See [Push checks](/checks/push) for the full guide. ## Creating each type All five are available from the **app**, the [CLI](/cli/commands), and the [MCP server](/mcp/tools) (`create_check` with `check_type` = `sql`, `http`, `api_metric`, `heartbeat`, or `push`). ```bash theme={null} # Website check alertee checks create --type http --name "Marketing site" \ --url https://example.com --expected-status 200 --interval five_minutes # API metric check (alert when daily signups drop below 10) alertee checks create --type api_metric --name "Daily signups" \ --url https://api.example.com/stats --value-path signups.today \ --header "Authorization: Bearer $TOKEN" \ --condition greater_or_equal --threshold 10 --interval hourly # Heartbeat check (prints the ping URL) alertee checks create --type heartbeat --name "Nightly ETL" \ --expected-interval 1440 --interval hourly # Push check (prints the ingest URL to POST your number to) alertee checks create --type push --name "Nightly load rows" \ --staleness-mins 30 --condition greater_or_equal --threshold 100 \ --interval fifteen_minutes ``` # Conditions Source: https://docs.alertee.io/checks/conditions How Alertee evaluates your query results. A condition tells Alertee what the **healthy** result of your SQL query looks like. The check passes while the condition holds and **alerts when it is violated** — the same polarity for single-value and grid checks. ## Standard conditions These apply to queries that return a single value. | Condition | Healthy when… | Value field | | - | - | - | | `greater_than` | result > threshold | `threshold` | | `less_than` | result \< threshold | `threshold` | | `greater_or_equal` | result ≥ threshold | `threshold` | | `less_or_equal` | result ≤ threshold | `threshold` | | `equals` | result = value | `threshold` (or `match_value` for text) | | `not_equals` | result ≠ value | `threshold` (or `match_value` for text) | | `between` | min ≤ result ≤ max | `min_value` + `max_value` | | `not_between` | result \< min or result > max | `min_value` + `max_value` | | `contains` | text result contains the substring | `match_value` | | `regex` | text result matches the pattern | `match_value` | | `timestamp_age` | a timestamp result is no older than N minutes (freshness) | `threshold` (minutes) | | `is_null` | the result is NULL | — | | `is_not_null` | the result is not NULL | — | | `exists` | the query returns any row | — | > [!NOTE] > > The condition describes the **healthy** state. For example, `greater_than 10` > passes while the value is above 10 and alerts when it drops to 10 or below. To > alert when a value goes *above* a limit, assert the healthy ceiling instead, > e.g. `less_or_equal 10`. ### Examples ```sql theme={null} -- Healthy while failed payments stay at or below 10 in the last hour; -- alerts when they exceed it. SELECT COUNT(*) FROM payments WHERE status = 'failed' AND created_at > NOW() - INTERVAL '1 hour' -- Condition: less_or_equal 10 ``` ```sql theme={null} -- Alert if no new users signed up in the last 30 minutes SELECT COUNT(*) FROM users WHERE created_at > NOW() - INTERVAL '30 minutes' -- Condition: greater_than 0 (healthy while at least one signed up) ``` ```sql theme={null} -- Data freshness: alert if the newest row is more than 15 minutes old SELECT MAX(created_at) FROM events -- Condition: timestamp_age 15 ``` ```sql theme={null} -- Alert if the latest deploy status isn't "success" SELECT status FROM deploys ORDER BY created_at DESC LIMIT 1 -- Condition: equals (match_value: success) ``` ## Escalation thresholds A single-value check can carry **multiple thresholds, each with its own alert level** — warn as a metric approaches a limit, go critical when it crosses it, without creating two checks. * The **primary condition** alerts at the check's alert level. * Each **escalation threshold** is another healthy comparison with an explicit level (`info`, `warning`, `error`, `critical`). * Every threshold describes the **healthy** state. On each run, all of them are evaluated, and if several aren't met the **most serious level** is used. * When a worse threshold is crossed while an incident is already open, the incident **escalates**: its severity is raised and a fresh alert goes out at the new level (you're not left assuming it's still just a warning). Example — monthly usage with a 100k hard limit: ```text theme={null} Primary condition: less_than 75000 (check Alert Level: warning) Escalation threshold: less_than 100000 → critical ``` At 80k the check fails at **warning**. If usage reaches 100k the open incident escalates to **critical** and re-alerts. In the app, open **More options** under the condition and add levels under **Escalation thresholds**; via the CLI use `--extra-threshold "less_than:100000:critical"`; via MCP pass `thresholds`. Per-row (grid) checks don't support escalation thresholds. ## Custom alert messages By default the alert/incident text is auto-generated (e.g. *"Value 17 is not greater than 1560"* or *"Extracted value 17 from …"*). Set a **custom message** to replace it with something your responders can act on. It works for **any check type** — single-value SQL, api\_metric, push, grid, http, and heartbeat — and is a property of the check itself, so you can set or change it on its own without touching the condition. The message supports templating, substituted at alert time: | Token | Resolves to | | - | - | | `{check_name}` | The check's name | | `{value}` | The value that triggered the alert | | `{threshold}` | The comparison value the check is testing against | | `{name}` | The failing row's group (per-row checks only) | ```text theme={null} {check_name} stale: {value} rows, expected at least {threshold}. Re-run the sink. ``` The custom message changes only the **alert/incident body** — `run_check` still shows the literal verdict so you can always see the raw comparison. Set it in the app under **Alerts → Advanced → Custom message**, via MCP `create_check`/`update_check` with `custom_message` (on `update_check` it's settable on its own — no need to re-send the condition; pass an empty string to clear it), or via the CLI with `--alert-message` on `checks create` **or** `checks update`. ## Checking each row A per-row check (a *grid* check in the API, CLI and MCP) watches **many groups at once** — useful when you want to watch many stores, regions, services, or endpoints in a single check. Your query must return two columns: `name` (the group) and `value` (the metric). In the app, open **More options** under the condition and set **Check** to **Each row**. When you test a query that returns several rows with `name` and `value` columns, the form offers a **Check each row** button that does this for you. ```sql theme={null} SELECT store_id AS name, COUNT(*) AS value FROM orders WHERE created_at > NOW() - INTERVAL '15 minutes' GROUP BY store_id ``` The comparison you choose describes the **healthy** state of each row — exactly like a single-value check — and the check alerts on rows that don't meet it. Rows support the numeric comparisons (`greater_than`, `less_than`, `greater_or_equal`, `less_or_equal`, `equals`, `not_equals`). | **Alert when** (app) | API value | Healthy state | Alert fires when… | | - | - | - | - | | Any row is unhealthy | `all_cells` | Every row must be healthy | **Any** row fails the comparison | | No row is healthy | `any_cell` | At least one row must be healthy | **No** row meets the comparison | | A group goes missing | `dimension_missing` | Every group from the last run is still there | A group from the last run is absent | | A new group appears | `dimension_added` | No groups appear that the last run didn't have | A group appears that the last run didn't return | ### Example: every store should have at least 5 orders ```sql theme={null} SELECT store_id AS name, COUNT(*) AS value FROM orders WHERE created_at > NOW() - INTERVAL '15 minutes' GROUP BY store_id ``` Condition: `all_cells` (**Any row is unhealthy**) — a row is healthy when its value is **greater than or equal** `5` This fires if *any* store has fewer than 5 orders in the last 15 minutes. (Use `any_cell`, **No row is healthy**, when only one row needs to be healthy — e.g. "at least one replica must be caught up".) # Grace periods Source: https://docs.alertee.io/checks/grace-periods Tolerate a few transient failures before alerting, so a single blip on a spiky metric doesn't page anyone. By default a check alerts on the **first** failing run. A **grace period** lets a check tolerate a few failures first — so a naturally spiky metric (latency, queue depth, request volume) doesn't page you over a momentary blip. ## Two types * **Consecutive** *(default)* — alert after **N failures in a row**. Any single success resets the count. Good for "only tell me if it's been broken for a while." * **Within window** — alert after **N failures inside a rolling window** of *M* minutes, even if they aren't back-to-back. Good for "tell me if it's flapping," where intermittent failures still matter. So a grace period has up to three parts: whether it's **on**, the **count** (N failures to tolerate), and — for *within window* — the **window** (M minutes). For example, with **3 consecutive**: a check that goes `fail → fail → success` never alerts — the success reset the streak. But `fail → fail → fail` does, on the third one. With **3 within 30 minutes**, those three failures trigger an alert even if there were passing runs mixed in, as long as they fell inside the same 30-minute window. ## When to use it Use a grace period for metrics that briefly wobble on their own. **Don't** use it for must-not-fail checks — data freshness, replication lag, a row that must exist — those should alert immediately. > [!NOTE] > > A grace period delays the alert, not the detection. The check still runs and > records each failure; you'll see it going red in the dashboard before the grace > period is exhausted and the alert fires. ## Setting a grace period In the app, open **Advanced** in the check form's alerts section and tick **Only alert after repeated failures**. Everywhere else: ```bash theme={null} # CLI — tolerate 3 consecutive failures before alerting alertee checks create --name "API latency" --connection prod \ --query "SELECT p95_ms FROM latency" --condition less_than --threshold 500 \ --interval five_minutes --grace 3 # Flapping: 3 failures within a 30-minute window alertee checks update "API latency" --grace 3 --grace-type within_window --grace-window 30 # Turn grace off again alertee checks update "API latency" --grace 0 ``` Over [MCP](/mcp/tools), `create_check` and `update_check` take `grace_period_enabled`, `grace_period`, `grace_period_type` (`consecutive` / `within_window`), and `grace_period_window`. When Alertee's AI suggests a check for a spiky metric, it sets an appropriate grace period for you. # Intervals & plans Source: https://docs.alertee.io/checks/intervals How often checks run and which intervals are available on each plan. Alertee runs checks on a fixed schedule. The minimum interval depends on your plan. ## Available intervals | Interval | Free | Starter | Team | | - | - | - | - | | 1 minute | — | — | ✓ | | 5 minutes | — | ✓ | ✓ | | 15 minutes | ✓ | ✓ | ✓ | | 30 minutes | ✓ | ✓ | ✓ | | 60 minutes | ✓ | ✓ | ✓ | The minimum interval, along with check and connection limits, depends on your plan — see [Plans & billing](/billing/overview) for the full table. ## Choosing an interval Match your interval to the window your query examines: * A **1-minute** check should look at the last **1–2 minutes** of data * A **15-minute** check should look at the last **15–30 minutes** of data If your window is too narrow relative to the interval, you may miss events that fell between runs. # Managed checks Source: https://docs.alertee.io/checks/managed Let Alertee's agent author a check from your schema and keep it tuned. Every check is owned by either **you** or **Alertee**. A check you write stays exactly as written. A check Alertee's agent authors is **managed by Alertee** — the agent picks the query and threshold, and re-reviews them over time. ## How the agent authors a check Connect a PostgreSQL or ClickHouse database, then either click **Suggest checks** or describe what you want to watch in plain English. The agent: 1. **Inspects your schema** — tables, columns, and types over a read-only connection. 2. **Samples a little data** and tests candidate queries to calibrate a baseline. 3. **Drafts a query and threshold** — baseline-aware where it helps (rolling averages, window functions, z-scores). 4. **Presents the result for review.** Nothing runs until you enable it. The SQL is always visible and editable. > [!NOTE] > > Only query structure and small result samples are sent to the model (Anthropic > by default, with OpenAI as an alternative provider). Bulk data is never > uploaded, and Alertee does not call a model on every alert — the model work > happens during deliberate authoring and scheduled review. ## Keeping it tuned A managed check carries a `next_model_review_at` date. When it comes due, the agent re-examines the check against current data and decides whether the query or threshold should change. The cadence is proportional to how volatile the data is — typically every few days to a couple of weeks. Every review is recorded with a **before/after SQL diff, the new condition, the model used, and the reasoning** — whether or not anything changed. You can see the full history of a managed check's reviews on its **History** tab. ## Converting a check you wrote You can hand a check you authored over to Alertee from the check's **⋯ menu → Let Alertee maintain this query…**. This doesn't flip a switch blindly: Alertee reviews the check against its recent history and shows you exactly what it proposes — a before/after SQL diff, the new condition, and its reasoning — **before anything is applied**. Approve it to enable managed mode with that change, or decline and nothing happens. If Alertee decides the check is already well-calibrated, it says so and simply enables managed mode without altering your query. Your alert level, schedule, alert routing, and grace period are never touched by the switch — only the SQL and condition come under Alertee's review. Both single-value and [grid (multi-dimensional)](/grid-checks) checks can be managed — Alertee keeps a grid check multi-dimensional when it reviews it. [Heartbeat](/checks/check-types#heartbeat-check-heartbeat) and [push](/checks/push) checks can't be managed: their values arrive from outside, so there's no query for Alertee to author. When the data only moves on weekdays and goes flat on a known set of holidays, Alertee attaches the matching **calendar** (NYSE = US market holidays, UK = UK bank holidays, plus LSE, TSX, XETRA, EURONEXT) so the check stays quiet on those closed days instead of firing a false alarm. A calendar only affects which **days** are quiet — time-of-day stays with the check's [schedule](/checks/scheduling), and the two compose. This happens both when Alertee **authors** a check (it confirms the weekday/holiday pattern in the data first) and when it **reviews** a managed one. You'll see it in the convert proposal before you approve, and you can change or clear it anytime. ## Taking a check back You can convert a managed check to user-owned at any time from **⋯ menu → Take back control…**. The agent stops reviewing it and it behaves like any check you wrote yourself — there's no lock-in. If Alertee rewrote the check while managing it, you choose what to keep: **keep Alertee's current version**, or **restore your original** — the exact query and condition you wrote before Alertee first changed it. ## Related * [Checks overview](/checks/overview) — anatomy and ownership * [Conditions](/checks/conditions) — what the threshold compares against * [The Inbox](/inbox/overview) — incident outcomes feed back into noise reduction # Checks overview Source: https://docs.alertee.io/checks/overview What a check is and how to configure one. A **check** watches something on a schedule and opens an [incident](/inbox/overview) (and fires an alert) when it goes wrong. Most checks run a **SQL query** against your database and evaluate the result against a condition, but Alertee also has **website/API** checks, **heartbeat** (dead-man's-switch) checks, and **push** checks (your own job sends us the number — see [push checks](/checks/push)) — see [Check types](/checks/check-types). The rest of this page covers SQL checks. ## Who owns the check Every check is owned by either you or Alertee's agent: * **You** — you wrote the SQL and condition. Alertee runs it exactly as written and never changes it. * **Alertee** — the agent authored the query and threshold from your schema and keeps it tuned on a review cadence. These are marked **managed by Alertee**. See [Managed checks](/checks/managed). You can take a managed check back at any time; it becomes user-owned and the agent stops touching it. ## Anatomy of a check | Field | Description | | - | - | | **Name** | Human-readable label shown in the checks list | | **Connection** | Which database to query | | **Query** | SQL that returns either a single numeric value, or `name`/`value` rows for a grid check | | **Condition** | The result's healthy state — the check alerts when it's violated (e.g. `> 0`, or a grid condition across rows) | | **Interval** | How often to run (1, 5, 15, 30, or 60 minutes) | | **Alert group** | Who to notify when the condition is met | | **Grace period** | Optional delay before an alert fires, to avoid noise | ## Writing a good query Alertee supports two shapes of query, and the shape you choose determines which conditions are available: * **Single-value check** — return **one row with one numeric column**. The condition compares that number against a threshold. * **Per-row (grid) check** — return **multiple rows** with `name` and `value` columns, one row per group (store, region, ticker, endpoint…). The condition is evaluated for each row. See [Conditions](/checks/conditions#checking-each-row) for the full set. ```sql Single value — one number theme={null} SELECT COUNT(*) FROM orders WHERE created_at > NOW() - INTERVAL '5 minutes' ``` ```sql Single value — with filtering theme={null} SELECT SUM(amount) FROM payments WHERE status = 'failed' AND created_at > NOW() - INTERVAL '1 hour' ``` ```sql Per-row — one row per group theme={null} SELECT store_id AS name, COUNT(*) AS value FROM orders WHERE created_at > NOW() - INTERVAL '15 minutes' GROUP BY store_id ``` > [!NOTE] > > A query that returns multiple rows is only a problem for a **single-value** > check. To monitor many groups at once, alias your columns to `name` and > `value` and [check each row](/checks/conditions#checking-each-row). > [!TIP] > > Use `@now - INTERVAL '...'` to scope your query to a sliding window that matches your check interval. A 5-minute check should look at the last 5–10 minutes of data. ## Query variables You can reference these variables in your SQL. They're bound at run time: | Variable | Meaning | | - | - | | `@now` | The current evaluation time. **Prefer this over `NOW()`** — it rewinds during a simulation so backtests are accurate. | | `@last_checked` | When this check last ran (the previous step during a simulation) | | `@last_success` | When this check last passed | | `@last_failure` | When this check last failed | | `@check_interval` | How often the check runs, as an interval | | `@check_id` | The UUID of this check | `NOW()` and `current_timestamp` still work and are rewound during simulations too. ## Replay against history (backtest) From a check's **⋯ menu** choose **Replay against history…** (or, while creating or editing a SQL check, open **More options** under the condition and choose **Replay against history**) to run the query over a past window — it rewinds `@now` to each point in time and shows when an alert *would* have fired, without sending anything. It's off by default because it runs one query per step against your database; you can stop it at any time. For a saved check you can optionally save the run into history, then delete it later from the check's **History** tab (under **Replays**). ## The Checks page The Checks page lists every check on the left and shows the selected one in full beside it. Each row is the check's name and one status line — **Healthy**, **Failing · Critical**, **Paused** or **Snoozed until …** — with when it last ran and when it runs next. Use the arrow keys to move through the list. On a phone, tapping a check opens it full screen, with **Back to checks** to return. Above the list, **Filter** narrows it by status and sets the chart range (12 hours to 30 days); active filters show as chips you can remove. Links keep the selection and filters: `/checks?check=` opens a check, and `/checks?new=1` opens the create form. The selected check shows its status and three actions: **Run now**, **Edit check**, and a **⋯ menu** with pause/resume, snooze, mute, handing the query to Alertee (or taking it back), replay against history, and delete. A failing check links to its incident with **View incident in Inbox**. Below that are two tabs: * **Overview** — the chart (or the heatmap for a grid check), then **Details** with the connection, condition, schedule, alert routing, query and the check's active schedule. * **History** — every change to the check (edits, Alertee's rewrites, schedule changes), Alertee's reviews for a check it maintains, and any saved replays. ## Check status | Status | Meaning | | - | - | | `healthy` | Last run passed — condition was not met | | `issue` | Condition was met — an incident is open and the alert was sent | | `error` | Query failed to run (connection issue, bad SQL) | A check can also be **disabled** (it stops running), **muted** (keeps running but sends no alerts — handy while tuning), **snoozed**, or limited to an [active schedule](/checks/scheduling) — a calendar (closed days) and/or custom hours — so it only runs when it matters. To avoid paging on a brief blip, give a spiky check a [grace period](/checks/grace-periods) so it tolerates a few failures before alerting. ## Connections Connections store an encrypted link to your database. Alertee supports **PostgreSQL** and **ClickHouse**, self-hosted or managed (Supabase, Neon, AWS RDS, Google Cloud SQL, ClickHouse Cloud, …), as long as the database is reachable from the public internet. Credentials are encrypted at rest using per-organization keys. Alertee uses read-only connections — it will never modify your data. Revoke access any time by rotating the database user. ## Alert groups An alert group is a named collection of notification channels. You can have multiple groups (e.g. "On-call", "Data team") and assign different checks to different groups. Channels supported: * **Email** — send to individual addresses or managed email groups * **Slack** — post to a channel via OAuth * **Webhook** — POST a JSON payload to any URL # Query performance Source: https://docs.alertee.io/checks/performance Alertee times every check's query and flags slow ones in your inbox — with index suggestions — so you can keep the load on your database light. Every time a check runs, Alertee measures how long its query takes to run and fetch results against **your** database. That timing is stored with each result, so you can see whether a check is cheap or heavy — and Alertee tells you when one gets slow. ## What you'll see **In the chart.** Hover any point in a check's history and the tooltip shows `Ran in N.Ns`. A run at or over the slow threshold is labelled **slow**. **In your inbox.** When a query takes longer than the threshold to run, Alertee opens a **performance** suggestion for that check under **Inbox → Suggestions** (separate from any failure incident — the two never interfere). Its severity scales with how slow the query is: | Query time | Severity | | - | - | | 5–15 seconds | `info` | | 15–25 seconds | `warning` | | 25 seconds or more | `critical` | The item auto-resolves once the query is fast again. A query so slow it **times out** (hits the run cap and is cancelled with `context deadline exceeded`) is the extreme of this — it raises a `critical` performance item with index suggestions alongside the failure incident, so the worst-performing query still shows up here rather than only as a bare error. **In alerts.** If a check is *also* firing an alert (e.g. it failed), and the run was slow, the alert carries a `⚠️ This check's query took N s to run` line so recipients know to look at the performance item too. ## Index suggestions When a run is slow, Alertee runs a plain `EXPLAIN` on the query (it **never** runs `EXPLAIN ANALYZE`, so your query is not executed a second time) and looks for sequential scans on large tables. When it finds one, the performance item includes a suggestion such as: ```sql theme={null} CREATE INDEX ON orders (store_id); ``` Suggestions are derived from the query plan. Treat them as a starting point — review them against your schema and workload before adding an index, since the right index depends on your full query mix, not one check. When the [incident diagnosis](/inbox/overview) or a managed-check review proposes a fix, it reads the **real schema and existing indexes of the tables your check queries** first (introspected on demand and cached per table for a few hours) — so it works from the indexes you actually have rather than guessing, won't re-suggest one that already exists, and can tell you when the indexes are fine and the slowness is elsewhere (data volume, query shape). If there are no suggestions, the slowness is usually in aggregation, the amount of data scanned, or the database itself rather than a missing index. ## When Alertee generates checks for you The AI that drafts checks is performance-aware before a check ever runs. It reads your schema with each table's **size and existing indexes**, times its test queries, and runs `EXPLAIN` (never `EXPLAIN ANALYZE` — it doesn't execute your query) on each candidate. From that: * An **efficient** query is suggested normally. * A worthwhile check that **needs an index you don't have** is still suggested, but with a note telling you the exact index to add first, e.g. *"Add an index before saving: `CREATE INDEX ON orders (store_id);`"*. Add the index, then save. * A **low-value check that would be expensive** (a nice-to-have that would scan a huge table every run) is skipped, and the assistant tells you why — so you can ask for it explicitly if you disagree. ## Keeping checks light A few things keep the load Alertee puts on your database small: * **Filter in SQL.** A `WHERE` clause that an index can serve beats scanning a whole table. The suggestions above point at exactly these cases. * **Aggregate in the query.** Return one number (or one row per dimension for a [grid check](/grid-checks)) rather than many rows. * **Match the [interval](/checks/intervals) to the need.** A query that takes several seconds doesn't need to run every minute. ## Via the API, MCP, and CLI Performance items are ordinary inbox items with `itemType: "performance"`, so they show up in `list_inbox` / `get_inbox_item` (and the CLI). The query duration and any index suggestions are in the item's `sourceMetadata`. # Push checks Source: https://docs.alertee.io/checks/push Push a number to Alertee from your own systems — no credentials, works from a private network, with a dead-man switch built in. A push check inverts the usual direction. Instead of Alertee reaching into your database, **your** cron job, script, or CI step POSTs a number to a private ingest URL. The pushed value runs through exactly the same [condition engine](/checks/conditions) as a SQL check — single-value or grid — and flows into the same incidents and alerts. That means: * **Zero credentials.** Alertee never holds a database password, and never opens a connection to you. * **Works from a private network.** Your job only needs outbound HTTPS. No bastion, no IP allow-list, no VPC peering. * **Dead-man switch included.** If nothing is pushed inside the staleness window, the check fails on its next scheduled run — so silence is an alert, not a gap. Use it when the query you want to run can't leave your network, when the number already exists in a script you run anyway, or when you'd rather not hand over credentials at all. ## Creating one Set a **staleness window** (how long the check tolerates silence, default 60 minutes) and a **condition** on the pushed value. Alertee mints an ingest URL when the check is saved and shows it to you — the token in that URL is the only credential, so treat it like a secret. ```bash theme={null} # Alert if fewer than 100 rows land, or if nothing is pushed for 30 minutes alertee checks create --type push --name "Nightly load rows" \ --staleness-mins 30 --condition greater_or_equal --threshold 100 \ --interval fifteen_minutes ``` The condition describes the **healthy** state and the check alerts when it's violated — `greater_or_equal 100` is healthy at 100 rows and alerts at 99. See [Conditions](/checks/conditions). ## Pushing a value Two body shapes are accepted. Send one or the other, never both. ### A single number ```json theme={null} { "value": 42 } ``` ```bash theme={null} curl -fsS -X POST https://api.alertee.app/ingest/ \ -H 'Content-Type: application/json' \ -d '{"value": 42}' ``` ### Named rows (a grid) One row per dimension — store, region, tenant, feed. Each `name` is a cell, evaluated against your per-cell condition. Up to 500 rows per push, and a name may appear only once in a batch. ```json theme={null} { "rows": [ { "name": "eu-west", "value": 12 }, { "name": "us-east", "value": 9 } ] } ``` ```bash theme={null} curl -fsS -X POST https://api.alertee.app/ingest/ \ -H 'Content-Type: application/json' \ -d '{"rows": [{"name": "eu-west", "value": 12}, {"name": "us-east", "value": 9}]}' ``` There is **no auth header** — the token in the path is the credential, exactly as for a [heartbeat](/checks/check-types#heartbeat-check-heartbeat) ping. The CLI wraps the same endpoint, so a job that already has the CLI installed doesn't need to hand-roll JSON (and doesn't need to be logged in): ```bash theme={null} alertee push 42 # single value alertee push eu-west=12 us-east=9 # grid ``` ## In a cron job Run your own query, inside your own network, and push us the number: ```bash theme={null} #!/usr/bin/env bash set -euo pipefail ROWS=$(psql "$DATABASE_URL" -tAc \ "SELECT count(*) FROM orders WHERE created_at > now() - interval '1 hour'") curl -fsS -X POST "https://api.alertee.app/ingest/$ALERTEE_INGEST_TOKEN" \ -H 'Content-Type: application/json' \ -d "{\"value\": $ROWS}" ``` ```text theme={null} # every 15 minutes */15 * * * * /usr/local/bin/report-order-count.sh ``` ## How a push is evaluated Each push is evaluated **immediately** — you don't wait for the next scheduled run: 1. The values are stored as the check's latest batch. 2. The condition is applied — single-value against `value`, grid per `name`. 3. A run and result are recorded, so the value appears on the check's chart and history like any other check. 4. An incident is opened or resolved, and alerts route through the check's alert group, honouring its grace period. The response tells you what happened: ```json theme={null} { "success": true, "check_id": "…", "verdict": "healthy" } ``` `verdict` is `healthy`, `alerting`, or `error`. `alertee push` prints it for you. Because grace-period state is shared with the scheduled path, a check pushed every minute alerts **once per incident**, not once per push. ## Staleness (the dead-man switch) The check's own [interval](/checks/intervals) is what makes silence detectable. On each scheduled run Alertee reads the latest batch and compares its age to `staleness_mins`: * Latest value is **inside** the window → the condition is evaluated as normal. * Latest value is **older** than the window → the check fails with "No data received in the last N minutes". * **Nothing ever pushed** → the check fails with "No data received yet" until the first push arrives. Set the check's interval at or below the staleness window, otherwise a stale check waits for the next run before it notices. Changing `staleness_mins` later never rotates the ingest URL, so a retune won't break jobs already pushing. ## Retention Pushed samples are kept for **30 days** and pruned daily. Only the most recent batch is ever evaluated. The durable record is the check's run history, which follows normal check-result retention — so a value's chart and incident trail outlive the raw sample. ## Limits | Limit | Value | | - | - | | Rows per push | 500 | | Dimension name length | 200 characters | | Values | Finite numbers only (no `NaN`/`Infinity`) | | Duplicate names in one push | Rejected | ## Everywhere else Available from the **app** (check type "Push a number"), the [CLI](/cli/commands) (`--type push`, plus the `alertee push` command), and the [MCP server](/mcp/tools) (`create_check` with `check_type: "push"`, which returns the ingest URL and an example `curl`). # Active schedule & snooze Source: https://docs.alertee.io/checks/scheduling Control when a check is expected to be running — with a calendar, a custom schedule, or a one-off snooze. A check runs on its [interval](/checks/intervals). Its **active schedule** says *when it's expected to be running* — outside that, the check is **skipped** (not run), so it won't alert and won't record a result during expected-quiet periods. Two independent controls, and they **compose**: * a **calendar** — which whole **days** are closed (weekends + a holiday set), and * a **custom schedule** — the **hours/days** the check is active. Plus two ways to silence a check directly: **snooze** (a one-off, auto-expiring override that skips runs) and **mute** (keep running, but send no alerts). You can set the calendar and active hours right in the **check form**: when you create a check, open **Only run at certain times** under **How often**; when you edit one, use the schedule section of the form. Edit them later from the check's **Details** (the **Active schedule** section); snooze and mute are also on the check's **⋯ menu**. All of it works over the CLI / [MCP](/mcp/tools) too. > [!TIP] > > For market hours, reach for a **calendar + active hours** rather than a custom > **UTC cron**. Active hours are evaluated in a named timezone, so they don't drift > the hour each daylight-saving change the way a fixed UTC cron does — and the > calendar gives you holidays (e.g. Juneteenth) for free. ## Calendar Point a check at a calendar and it's quiet on that calendar's **closed days** — weekends and its holidays. It's **day-level only**: it does not touch time-of-day (that's the custom schedule below). Holidays are computed from each calendar's rules, so there's no list to maintain. ```bash theme={null} alertee checks update "Trade volume" --calendar NYSE alertee checks update "UK settlements" --calendar UK alertee checks update "Trade volume" --clear-calendar ``` Supported: `NYSE` (US market holidays), `UK` (UK bank holidays), `LSE`, `TSX`, `XETRA`, `EURONEXT`. Want it quiet outside trading hours too? Add a custom schedule — the calendar handles the closed days, the schedule handles the hours. ## Custom schedule To control the active **hours** (e.g. only during a trading session, or business hours), define them yourself — on its own, or alongside a calendar: | Rule | Effect | | - | - | | `before HH:MM` | Active from this local time (quiet before it) | | `after HH:MM` | Active until this local time (quiet after it) | | `weekdays` | Active Mon–Fri only; quiet all weekend | ```bash theme={null} # Active 09:30–16:00 ET, weekdays only alertee checks schedule "Trade volume" --before 09:30 --after 16:00 --weekdays --tz America/New_York # Remove the custom schedule alertee checks schedule "Trade volume" --clear ``` ## Suggest from history Don't want to work out the hours yourself? Alertee can infer them from the check's own run history — it looks at when the check normally has data and proposes an active schedule. It's a **suggestion**; nothing changes until you apply it. ```bash theme={null} # Show a suggested schedule from the last 30 days alertee checks suggest-schedule "Trade volume" # Apply it as the check's custom schedule alertee checks suggest-schedule "Trade volume" --apply ``` Also available over [MCP](/mcp/tools) (`suggest_check_schedule`). Under-observed hours are left out — Alertee won't propose silencing a time it hasn't seen enough of. Alertee also does this **proactively**: when a check is consistently noisy at the same times, it raises a *"Set a schedule"* suggestion in the [inbox](/inbox/overview) with the inferred schedule. Nothing changes until you apply it. ## Snooze Temporarily silence a check — during a known incident, a migration, or a deploy. * Defaults to the rest of the local day and **auto-expires**. * Pass `--until` for a fixed end time. * End it early with `checks unsnooze` (or the `unsnooze_check` MCP tool). ```bash theme={null} alertee checks snooze "Orders (5m)" alertee checks snooze "Orders (5m)" --until 2026-06-03T09:00:00Z --reason "deploy in progress" alertee checks unsnooze "Orders (5m)" # resume alerts now ``` > [!NOTE] > > Outside its active schedule (or while snoozed) a check is **skipped** — it isn't > run, so there's no result for that tick and no alert. This keeps history clean > of expected-quiet gaps rather than filling it with suppressed failures. ## Mute **Mute** silences a check's notifications **without stopping it**. The check keeps running on its interval and its status keeps updating on the dashboard — it just won't send alerts. It stays muted until you unmute it. This is the right tool for a **new, not-yet-tuned check**: watch it go red/green while you dial in the query and threshold, without getting paged for every false alarm. ```bash theme={null} alertee checks update "Orders (5m)" --mute alertee checks update "Orders (5m)" --unmute ``` In the app, select the check and open its **⋯ menu → Mute alerts**. A muted check shows **Muted** on its status line in the list. Also available over [MCP](/mcp/tools) (`update_check` with `alerts_enabled`). > [!NOTE] > > **Mute vs. snooze vs. pause.** *Mute* keeps the check running but silent, > indefinitely (good for tuning). *Snooze* skips runs for a short, auto-expiring > window (good for a deploy or known incident). *Pause* stops the check > running entirely. # Authentication Source: https://docs.alertee.io/cli/authentication Authenticate the CLI through your browser. The CLI signs in through your browser using your existing Alertee account — no copy-pasting tokens. Behind the scenes it obtains a **personal access token (PAT)** and stores it locally at `~/.config/alertee/config.json`. ## Log in ```bash theme={null} alertee login ``` This opens your browser to an authorization page. If you're already signed in to the Alertee dashboard, just click **Authorize**; otherwise you'll sign in first. Once approved, control returns to your terminal automatically: ``` Opening your browser to authorize the CLI… If it doesn't open, visit: https://app.alertee.app/cli/authorize?port=...&state=...&challenge=... Logged in as you@acme.com (organization: "Acme Corp"). Run `alertee link` to switch organizations. ``` Login links your default organization automatically (or your only one). Run `alertee link` if you want a different org. > [!NOTE] > > The login uses PKCE: a one-time code is passed back to the CLI over a local > loopback address, and the token is only issued after the CLI proves it started > the request. The token itself never appears in a browser URL. ### Headless / SSH sessions If there's no browser on the machine (e.g. a remote server), print the URL instead of trying to open one, then open it on any device: ```bash theme={null} alertee login --no-browser ``` ## Link an organization If you belong to multiple organizations, choose which one the CLI should use: ```bash theme={null} alertee link ``` ``` ? Select an organization: › ❯ Acme Corp Personal ``` Your selection is saved to the local config. Re-run `alertee link` to switch. To target a different org for a single command without re-linking, pass `--org ` before the subcommand: `alertee --org checks list`. The env var `ALERTEE_ORG` does the same for a whole session (handy in CI). To use another saved account for just one command without changing the active account, pass `--account ` before the subcommand: ```bash theme={null} alertee --account work@acme.com checks list ``` This is the command-scoped equivalent of `ALERTEE_ACCOUNT`; it does not modify the active account saved in the config file. It can be combined with `--org`. ## Check status ```bash theme={null} alertee whoami ``` ``` API URL: https://prod-neon-alertee-gru2.encr.app Account: you@acme.com Token: alrt_X7kQ2mNp… Organization: Acme Corp ``` ## Multiple accounts The CLI stores every login, keyed by email — just run `alertee login` again with another account to add it, then switch between them like `gh auth switch`: ```bash theme={null} alertee auth status # list accounts; the active one is marked * alertee auth switch # switch account (prompts; toggles when there are two) alertee auth switch work@ # or name one by email / unique prefix ``` Each account keeps its own token and linked organization, so switching back restores the org you had linked. Switching applies immediately to the local MCP server too — it reads the active account on every tool call, no restart needed. To pin a shell session or an MCP server config to a specific account, set `ALERTEE_ACCOUNT=`. ## Log out ```bash theme={null} alertee logout # log out of the active account alertee logout work@acme.com # log out of a specific account ``` This removes that account's credentials from `~/.config/alertee/config.json` (other accounts are kept; the CLI switches to one of them automatically). ## CI / non-interactive use For pipelines where a browser flow isn't possible, create a token in the dashboard (**Settings → API tokens → New token**) and provide it via environment variables: ```bash theme={null} export ALERTEE_TOKEN="alrt_…" # Optional: target a non-default environment export ALERTEE_API_URL="https://staging-alertee-gru2.encr.app" alertee checks list ``` `ALERTEE_TOKEN` takes precedence over any stored credentials, so the CLI works without ever running `alertee login`. ## Token expiry Tokens expire after **1 year**. Run `alertee login` again to get a new one. # Commands Source: https://docs.alertee.io/cli/commands Full reference for all Alertee CLI commands. > [!NOTE] > > **Targeting an account or organization.** To use a different saved account for > one invocation without changing the active account, pass the global > **`--account `** flag before the subcommand — for example, > `alertee --account work@ checks list`. Likewise, **`--org `** overrides that > account's linked organization for one invocation. Both flags work with every > command and do not change saved defaults. The backend still checks your access. ## `alertee login` Authenticate through your browser. ```bash theme={null} alertee login ``` Opens your browser to authorize the CLI against your Alertee account (using PKCE), then saves credentials to `~/.config/alertee/config.json`. Use `--no-browser` to print the URL instead of opening one (handy over SSH). See [Authentication](/cli/authentication) for the full flow and CI usage. *** ## `alertee logout` Log out of an account — the active one by default, or a named one. ```bash theme={null} alertee logout # log out of the active account alertee logout work@acme.com # log out of a specific account ``` If other accounts remain, the CLI switches to one of them automatically. *** ## `alertee whoami` Show current authentication status. ```bash theme={null} alertee whoami ``` ``` API URL: https://prod-neon-alertee-gru2.encr.app Account: you@acme.com Token: alrt_X7kQ2mNp… Organization: Acme Corp ``` *** ## `alertee update` Update the CLI to the latest published version (checks npm, then installs). ```bash theme={null} alertee update ``` ``` Updating @alertee/cli v0.19.0 → v0.20.0… Updated to v0.20.0. ``` *** ## `alertee auth` Manage multiple accounts. `alertee login` and `alertee logout` are aliases for `auth login` / `auth logout`, so you only need this group when juggling more than one account. Each account keeps its own token and linked organization. ```bash theme={null} alertee auth login # add another account (run login again) alertee auth status # list accounts; the active one is marked * alertee auth switch # switch account (prompts; toggles when there are two) alertee auth switch work@ # switch by email or unique prefix alertee auth logout work@ # remove one account, keep the rest ``` ``` $ alertee auth status * you@acme.com Token: alrt_X7kQ2mNp… Organization: Acme Corp you@side-project.dev Token: alrt_J2wRtJq8… Organization: Personal * = active account. Switch with: alertee auth switch ``` Switching takes effect immediately for every CLI command **and the local MCP server** (it reads the active account on each tool call — no restart needed). To pin a shell session or an MCP server config to one account regardless of the active switch, set `ALERTEE_ACCOUNT=`. *** ## `alertee link` Link to an organization. Required before running any check commands. ```bash theme={null} alertee link ``` Fetches your organizations and prompts you to select one. Run again to switch organizations. *** ## `alertee plan` Show the linked org's plan, price, next invoice, estimated current-period spend, and usage. Handy before creating checks to confirm there's headroom. ```bash theme={null} alertee plan alertee plan --format json ``` JSON reports monetary values in integer cents (`monthly_price_cents` and `estimated_spend_cents`) with `currency`, plus `next_invoice_at` and `billing_period_end` timestamps. ``` Plan: Starter (active) Price: $29 / month Next invoice: est. $29 on 30 Sep 2026 Est. spend: $29 this billing period Checks: 8 / 25 Data sources: 2 / 5 Min interval: 5 min ``` *** ## `alertee org create [name]` Create a new organization and link to it (so the next `connections create` / `checks create` target it). You become the organization's owner. ```bash theme={null} alertee org create "Acme" alertee org create "Acme" --slug acme alertee org create # prompts for the name ``` Flags: `--slug ` (custom URL-safe slug; auto-generated from the name if omitted), `--no-link` (create without switching your linked organization). *** ## `alertee org list` List the organizations you belong to. The linked one is marked with `*`. ```bash theme={null} alertee org list alertee org list --format json ``` *** ## `alertee checks list` List all checks in the linked organization. ```bash theme={null} alertee checks list alertee checks list --compact ``` ``` NAME STATUS TYPE INTERVAL ID QUIET ─────────────────────────────────────────────────────────────────────────────────────────────── Orders last 5 min success sql 5 min 6f1a… — Failed payments failure sql 15 min a2c4… — Replication lag success api_metric 1 min b9e7… yes — Manually snoozed ``` The **QUIET** column shows whether each check's alerts are currently suppressed and why — a snooze, a calendar holiday, or off-hours. `--compact` trims the table to name, status, and active/paused/muted state. Add `--format json` for machine-readable output. Its fields use plain values (`enabled: true`, not `Enabled.Bool`), and request credentials are always redacted. Add `--compact` to omit configuration, descriptions, and runbook text: ```bash theme={null} alertee checks list --format json alertee checks list --format json --compact ``` *** ## `alertee checks get ` Show a single check's detail (status, interval, type, connection, query). JSON uses the same flattened fields as `checks list`; request credentials are redacted in both table and JSON output. ```bash theme={null} alertee checks get alertee checks get --format json ``` *** ## `alertee checks pause [checks...]` Pause one or more checks so they stop running. Names and IDs can be mixed, and `--all` pauses the entire organization in one batch. Pausing does not change a check's alert mute setting. ```bash theme={null} alertee checks pause "Orders freshness" "Archive completed" alertee checks pause --all alertee checks pause --all --format json ``` Use the matching `resume` command to start them again: ```bash theme={null} alertee checks resume "Orders freshness" alertee checks resume --all ``` *** ## `alertee checks history ` Show a check's recent run history. Defaults to the last 24 hours. ```bash theme={null} alertee checks history alertee checks history --hours 168 # last 7 days alertee checks history --format json ``` ``` CHECKED AT STATUS ───────────────────────────── 01/06/2026, 22:45:08 success 01/06/2026, 22:30:03 success ``` *** ## `alertee checks changelog ` Show a check's **change history** — config edits, Alertee AI reviews, and schedule/calendar/snooze changes, newest first. This is the *what-changed* log (distinct from `checks history`, which is run/status over time). ```bash theme={null} alertee checks changelog alertee checks changelog --limit 100 alertee checks changelog --format json ``` ``` 20/06/2026, 12:14:02 [schedule] Set calendar: NYSE calendar by user 20/06/2026, 12:14:02 [edit] Updated interval, cron schedule by Niall Brickell Interval: custom → fifteen_minutes Cron schedule: */15 14-20 * * 1-5 → (empty) ``` *** ## `alertee checks run ` Run a check immediately and print the result — handy for testing without waiting for the schedule. ```bash theme={null} alertee checks run alertee checks run --format json ``` The first line is a plain-English **verdict** that spells out the polarity, so there's no guessing which way round the comparison fires: ```text theme={null} ALERTING — Value 0.00 is not greater than 0.00. Healthy when value > 0; the check alerts when that's violated. ``` The comparison you configure describes the **healthy** state and the check alerts on violation — see [Conditions](/checks/conditions). ## `alertee checks preview-api` Probe a JSON API and list its extractable gjson paths, for authoring an `api_metric` check without curling first. Saves nothing. ```bash theme={null} alertee checks preview-api \ --url "https://api.tinybird.co/v0/sql" \ --query-param "q=SELECT count() AS value FROM events" \ --header "Authorization: Bearer $TINYBIRD_TOKEN" ``` ```text theme={null} HTTP 200 in 142ms Extractable paths (use one as --value-path): data.0.value = 1234 rows = 1 ``` Flags: `--url`, `--http-method`, `--header "Key: Value"` (repeatable), `--query-param "key=value"` (repeatable, auto-encoded), `--request-body`, `--value-path` (to confirm what a specific path extracts). See [API metric checks](/checks/api-metrics). *** ## `alertee checks open ` Open a check's page in your browser. ```bash theme={null} alertee checks open ``` *** ## `alertee connections list` List the database connections in the linked organization (use the `ID` when creating checks). ```bash theme={null} alertee connections list alertee connections list --format json ``` *** ## `alertee connections create` Create a database connection in the linked organization. Pass flags, or omit them to be prompted (the URI is hidden-prompted). The connection URI is sent to the API over HTTPS and encrypted server-side — the CLI never stores it. The backend tests the connection before saving, so a bad URI or unreachable host fails here rather than saving a broken connection. ```bash theme={null} alertee connections create --name "Acme prod" --type postgres \ --uri "postgres://user:pass@host:5432/acme" alertee connections create # prompts for name, type, and URI (hidden) ``` Flags: `--name`, `--type postgres|clickhouse`, `--uri `. *** ## `alertee connections update ` Update an existing connection — **rotate its credentials** (`--uri`) or rename it. Re-tested before saving. The URI is encrypted server-side and never stored by the CLI. ```bash theme={null} # Rotate the password / connection string alertee connections update "Acme prod" --uri "postgres://user:newpass@host:5432/acme" alertee connections update "Acme prod" # prompts for the new URI (hidden) ``` Flags: `--uri ` (new URI), `--name` (rename), `--type postgres|clickhouse`. *** ## `alertee connections test ` Test an existing connection by name or ID. Reports detected permissions. ```bash theme={null} alertee connections test "Acme prod" alertee connections test ``` *** ## `alertee connections delete ` Delete a connection by name or ID. Prompts for confirmation first. ```bash theme={null} alertee connections delete "Acme prod" alertee connections delete --yes # skip the confirmation ``` *** ## `alertee checks create` Create a new check — a SQL check (single-value or grid), a website/API check, an [API metric check](/checks/api-metrics), a heartbeat, or a [push check](/checks/push). Pass flags for non-interactive use (CI, or an AI assistant driving the CLI), or omit them to be prompted for each field at a terminal. The condition describes the **healthy** state and the check alerts when it's violated — see [Conditions](/checks/conditions). ```bash theme={null} # SQL single-value: healthy while at least one order arrives in the last 5 minutes alertee checks create --name "Orders (5 min)" --connection "Acme prod" \ --query "SELECT COUNT(*) FROM orders WHERE created_at > now() - interval '5 minutes'" \ --condition greater_than --threshold 0 --interval five_minutes # SQL freshness: alert if the newest event is more than 15 minutes old alertee checks create --name "Events fresh" --connection "Acme prod" \ --query "SELECT MAX(created_at) FROM events" \ --condition timestamp_age --threshold 15 --interval five_minutes # Grid: alert if any store has fewer than 5 orders alertee checks create --name "Orders per store" --connection "Acme prod" \ --query "SELECT store_id AS name, COUNT(*) AS value FROM orders GROUP BY store_id" \ --grid --evaluation-type all_cells --condition greater_or_equal --threshold 5 \ --interval fifteen_minutes # Website/API: alert if the site stops returning 200 or gets slow alertee checks create --type http --name "Marketing site" \ --url https://example.com --expected-status 200 --max-response-time 2000 \ --interval five_minutes # API metric: track a number from a JSON API and alert on a threshold alertee checks create --type api_metric --name "Daily signups" \ --url https://api.example.com/stats --value-path signups.today \ --header "Authorization: Bearer $TOKEN" \ --condition greater_or_equal --threshold 10 --interval hourly # Heartbeat: a once-a-day cron job (prints the ping URL to curl on success) alertee checks create --type heartbeat --name "Nightly ETL" \ --expected-interval 1440 --interval hourly # Push: your own cron POSTs the number (prints the ingest URL); no credentials alertee checks create --type push --name "Nightly load rows" \ --staleness-mins 30 --condition greater_or_equal --threshold 100 \ --interval fifteen_minutes # Interactive — prompts for anything you don't pass alertee checks create ``` Flags: `--name`, `--type `, `--interval`, `--alert-level`, `--alert-message ` (custom alert/incident text replacing the auto-generated message — supports `{check_name}`, `{value}`, `{threshold}`; see [custom alert messages](/checks/conditions#custom-alert-messages)), `--alert-group ` (route alerts to a specific group), `--calendar ` (follow a calendar — `NYSE`, `LSE`, `TSX`, `XETRA`, `EURONEXT`, `UK` — quiet on its holidays/weekends), `--description ` (short note on what the check covers/why — also fed to Alertee's [AI incident advisory](/inbox/overview) as domain context), `--documentation ` (longer-form runbook/notes), `--justification ` (why the check exists), `--mute` (create muted — runs but sends no alerts), `--grace ` / `--grace-type` / `--grace-window` (tolerate failures before alerting — see [grace periods](/checks/grace-periods)), `--exclude-query` / `--include-rows` / `--max-rows ` (control what [webhook alerts send](/alerts/overview#the-webhook-payload) — the SQL query is included by default, raw rows are not). * **SQL** (`--type sql`, default): `--connection `, `--query`; single-value/per-cell `--condition` (`greater_than`, `less_than`, `greater_or_equal`, `less_or_equal`, `equals`, `not_equals`, `between`, `not_between`, `contains`, `regex`, `timestamp_age`, `is_null`, `is_not_null`, `exists`) with its value flag `--threshold`, `--match-value`, or `--min`/`--max`; [escalation levels](/checks/conditions#escalation-thresholds) with repeatable `--extra-threshold "comparison:value:level"` (e.g. `--extra-threshold "less_than:100000:critical"` — worst violated level wins); grid `--grid`, `--evaluation-type`, `--severity`, `--label-query`. The check is single-value unless `--grid` or `--evaluation-type` is given. * **Website/API** (`--type http`): `--url`, `--http-method`, `--expected-status`, `--timeout`, `--max-response-time`, `--body-contains`, `--ssl-expiry-days`. * **API metric** (`--type api_metric`): `--url`, `--value-path` (gjson path to the metric in the JSON response), `--header "Key: Value"` (repeatable — auth tokens), `--query-param "key=value"` (repeatable, auto-encoded — e.g. `--query-param "q=SELECT count() AS value FROM events"` for Tinybird/HTTP-SQL), `--http-method`, `--request-body`, `--expected-status`, `--timeout`; plus the same condition flags as SQL (`--condition` + `--threshold`, or `--grid` / `--evaluation-type` when the path yields `{name,value}` rows). See [API metric checks](/checks/api-metrics). Use `alertee checks preview-api` (below) to discover value paths before saving. * **Heartbeat** (`--type heartbeat`): `--expected-interval` (minutes), `--heartbeat-grace`, `--last-ping-status`. * **Push** (`--type push`): `--staleness-mins` (the dead-man window — alert if nothing is pushed within this many minutes, default 60), plus the same condition flags as SQL (`--condition` + `--threshold`, or `--grid` / `--evaluation-type` for a grid push). Creating one prints the ingest URL your job POSTs to — see [push checks](/checks/push) and `alertee push` below. *** ## `alertee checks update ` Update a check's common fields by name or ID. This is a partial update — only the flags you pass change. With no flags at a terminal it drops into an interactive editor for the same fields. ```bash theme={null} alertee checks update "Orders last 5 min" --name "Orders (5 min)" alertee checks update --query "SELECT COUNT(*) FROM orders WHERE …" alertee checks update --interval fifteen_minutes --alert-level critical alertee checks update --threshold 850000 # change the comparison value alertee checks update --condition less_than --threshold 100 # change operator + value alertee checks update --extra-threshold "less_than:1000:critical" # replace escalation tiers alertee checks update --alert-message "{check_name} stale: {value} rows, want {threshold}" alertee checks update --pause # disable (stops running entirely) alertee checks update --resume # enable alertee checks update --mute # keep running, but send no alerts alertee checks update --unmute # re-enable alerts alertee checks update --grace 3 # tolerate 3 consecutive failures first alertee checks update --grace 0 # turn grace off alertee checks update # interactive: pick fields to edit alertee checks update --managed-by alertee # let Alertee maintain it alertee checks update --calendar NYSE # quiet on its holidays/weekends alertee checks update --clear-calendar # stop following a calendar alertee checks update --include-rows # send failing rows to webhooks alertee checks update --exclude-query # stop sending the SQL query alertee checks update --staleness-mins 15 # push: retune the dead-man window ``` Flags: `--name`, `--query`, `--staleness-mins` (push checks: retune the dead-man window — the existing ingest URL keeps working), `--label-query`, `--interval`, `--alert-level`, `--alert-message`, `--description`, `--documentation`, `--justification` (set the author notes — `--description` is also fed to Alertee's [AI incident advisory](/inbox/overview); pass `""` to clear any of them), `--condition`, `--threshold`, `--match-value`, `--min`, `--max`, `--evaluation-type`, `--severity`, `--extra-threshold`, `--pause`, `--resume`, `--mute`, `--unmute`, `--grace `, `--grace-type`, `--grace-window`, `--managed-by`, `--calendar`, `--clear-calendar`, `--tz`, `--include-query` / `--exclude-query`, `--include-rows` / `--exclude-rows`, `--max-rows ` (control what [webhook alerts send](/alerts/overview#the-webhook-payload)). * The condition flags (`--condition`, `--threshold`, `--match-value`, `--min`/`--max`, `--evaluation-type`, `--severity`, `--extra-threshold`) edit the check's condition in place — they're the same flags as `checks create` and only the ones you pass change; the rest of the condition (including escalation tiers) is preserved. See [conditions](/checks/conditions). * `--mute` silences a check's notifications **without stopping it** — it keeps running and updating its status, just doesn't alert. Stays muted until `--unmute`. Good for a noisy, not-yet-tuned check. (Contrast with `--pause`, which stops the check running, and snooze, which skips runs for a short window.) * `--grace ` tolerates that many failures before alerting (for spiky metrics); `--grace-type within_window` + `--grace-window ` counts failures in a rolling window instead of consecutively. `--grace 0` turns it off. See [grace periods](/checks/grace-periods). * `--managed-by user|alertee` switches who maintains the check. `alertee` hands it to Alertee, which re-authors and re-reviews it on a cadence. * `--calendar` makes the check follow a calendar (`NYSE` = US market holidays, `UK` = UK bank holidays, plus `LSE`, `TSX`, `XETRA`, `EURONEXT`) so it stays quiet on that calendar's **closed days** — weekends and its holidays. It's day-level only: time-of-day stays with the check's `schedule`, and the two compose. Editing the condition itself (especially grid conditions) is done in the web UI or via the MCP `update_check` tool. *** ## `alertee push [values...]` Push a number to a [push check's](/checks/push) ingest URL. This is the one command that needs **no login** — the token in the URL is the credential, which is what lets a cron inside a private network use it. ```bash theme={null} # Single value alertee push 42 # Grid: one name=value pair per dimension alertee push eu-west=12 us-east=9 # The full ingest URL works in place of the bare token alertee push https://api.alertee.app/ingest/ 42 ``` ```text theme={null} Pushed value 42. Verdict: healthy — the condition is satisfied Check: 8f1c… ``` Each push is evaluated against the check's condition immediately, so the printed verdict (`healthy`, `alerting`, or `error`) is the real result — not a queued acknowledgement. Flags: `--metadata ` (optional JSON attached to the pushed batch). *** ## `alertee checks delete ` Delete a check by name or ID. Prompts for confirmation first. ```bash theme={null} alertee checks delete "Orders last 5 min" alertee checks delete --yes # skip the confirmation ``` *** ## `alertee checks snooze ` Silence a check for the rest of today (it's skipped until then). Auto-expires, or end it early with `checks unsnooze`. See [Active schedule & snooze](/checks/scheduling). ```bash theme={null} alertee checks snooze "Orders (5 min)" alertee checks snooze --until 2026-06-03T09:00:00Z --reason "deploy in progress" ``` Flags: `--until ` (silence until a timestamp instead of end of day), `--tz ` (local day boundary, default `America/New_York`), `--reason`. *** ## `alertee checks unsnooze ` End a check's active snooze now, so its alerts resume immediately instead of waiting for the snooze to expire. No-op if the check isn't snoozed; leaves recurring quiet windows and calendars untouched. ```bash theme={null} alertee checks unsnooze "Replication lag" ``` Past snoozes show up under `alertee checks history ` (a **SNOOZES** section). *** ## `alertee checks schedule ` Set a check's **custom schedule** — the recurring hours/days it's expected to be active. Outside it the check is skipped, so it won't alert. This handles time-of-day; to also stay quiet on a calendar's holidays (and weekends), add `--calendar` — the two compose. See [Active schedule & snooze](/checks/scheduling). ```bash theme={null} alertee checks schedule "Trade volume" --before 09:30 --after 16:00 --weekdays --tz America/New_York alertee checks schedule "Trade volume" --clear # remove the schedule ``` Flags: `--before `, `--after `, `--weekdays` (quiet all weekend), `--tz `, `--reason`, `--clear`. *** ## `alertee checks suggest-schedule ` Infer an active schedule from the check's run history — Alertee looks at when the check normally has data and proposes hours/days. A **suggestion** only; pass `--apply` to set it as the check's custom schedule. See [Active schedule & snooze](/checks/scheduling). ```bash theme={null} alertee checks suggest-schedule "Trade volume" # show the suggestion alertee checks suggest-schedule "Trade volume" --apply # and apply it ``` Flags: `--days ` (history window, default 30), `--tz `, `--apply`. *** ## `alertee alert-groups` Manage alert groups and their recipients. An **alert group** is a named set of recipients; a check routes its alerts to one group (the org default if none is set). See [Alert groups](/alerts/overview) for the model. ```bash theme={null} alertee alert-groups list # default group marked * alertee alert-groups create "Acme oncall" alertee alert-groups update "Acme oncall" --name "Acme on-call" --default alertee alert-groups delete "Acme oncall" # --yes to skip confirmation alertee alert-groups test "Acme oncall" # send a test alert ``` **Recipients** (channels) within a group: ```bash theme={null} # List recipients (shows each channel's ID for removal) alertee alert-groups recipients "Acme oncall" # Add a webhook (optionally with headers) alertee alert-groups add-webhook "Acme oncall" \ --url https://hooks.example.com/abc --header "Authorization: Bearer xyz" # Add an email group (recipient list — see email-groups below) alertee alert-groups add-email-group "Acme oncall" --email-group "Acme emails" # Remove a recipient by its channel ID (from `recipients`) alertee alert-groups remove-recipient --yes ``` Slack recipients are configured in the web UI (they need a connected Slack workspace). *** ## `alertee email-groups` Manage **email groups** — reusable lists of email recipients (external addresses or organization members). Attach one to an alert group with `alert-groups add-email-group`. ```bash theme={null} alertee email-groups list alertee email-groups create "Acme emails" --email alice@acme.com --email bob@acme.com alertee email-groups update "Acme emails" --name "On-call emails" # rename / --description / --auto-add alertee email-groups members "Acme emails" alertee email-groups add "Acme emails" carol@acme.com dave@acme.com alertee email-groups remove "Acme emails" dave@acme.com alertee email-groups delete "Acme emails" # --yes to skip confirmation ``` *** ## `alertee inbox` View and triage inbox items (incidents). See [Inbox](/inbox/overview). ```bash theme={null} alertee inbox list # all items alertee inbox list --status open --severity critical --limit 20 alertee inbox list --check --status resolved # a check's past incidents alertee inbox list --format json alertee inbox get # detail + timeline + comments alertee inbox comment "Root cause: ETL cron was paused; resumed it" alertee inbox comment "internal note" --no-notify # skip the email fan-out alertee inbox edit-comment "Corrected: cron was paused, not failing" alertee inbox delete-comment alertee inbox ack --note "looking into it" alertee inbox resolve --outcome resolved_fix # resolved_fix | resolved_transient | ignored | suppressed | expected | duplicate | check_changed alertee inbox digest # briefing + counts ``` *** ## `alertee receivers` Manage **inbound webhook receivers** — external tools POST to a receiver's URL to open an inbox incident. `create` prints the URL; copy it into the other tool. ```bash theme={null} alertee receivers list alertee receivers create --name "Cron jobs" --severity warning \ --alert-group "Acme oncall" --auto-resolve alertee receivers delete "Cron jobs" # --yes to skip confirmation ``` Flags for `create`: `--name`, `--severity info|warning|error|critical`, `--title-template`, `--description-template`, `--alert-group `, `--auto-resolve`. POST a JSON body like `{"title":"…","severity":"critical","dedup_key":"…"}` to the printed URL. *** ## `alertee mcp` Start the MCP server for use with agents like Claude Code, or any MCP-compatible AI tool. ```bash theme={null} alertee mcp ``` This is normally invoked automatically via your `.mcp.json` config — you don't need to run it directly. See [MCP setup](/mcp/setup) for details. # Installation Source: https://docs.alertee.io/cli/installation Install the Alertee CLI. The Alertee CLI lets you manage checks, connections, and alert groups from your terminal — and from within AI coding sessions. ## Requirements * Node.js 22.12 or later ## Install via npx (no install required) ```bash theme={null} npx @alertee/cli --help ``` ## Install globally ```bash theme={null} npm install -g @alertee/cli ``` Then run: ```bash theme={null} alertee --help ``` ## Verify ```bash theme={null} alertee --version ``` ## Update ```bash theme={null} alertee update ``` Checks npm for the latest version and installs it (equivalent to `npm install -g @alertee/cli@latest`). ## Getting started After installing, three commands get you running: ```bash theme={null} alertee login # sign in via your browser alertee link # choose your organization alertee checks create # create your first check ``` Run `alertee --help` any time for the full command list and these links again. ## Next step [Authenticate with a personal access token →](/cli/authentication) # The Inbox Source: https://docs.alertee.io/inbox/overview Failed checks become incidents you own, resolve, and classify — and those outcomes cut future noise. When a check's condition is breached, Alertee doesn't just send a notification — it opens an **incident** in your Inbox. The Inbox turns alerts into owned work: something to acknowledge, assign, resolve, and learn from. ## Using the Inbox The Inbox has three views in the sidebar: | View | What's in it | | - | - | | **Inbox** | Open and acknowledged incidents from your checks and external alerts — what needs you. A line under the title counts them and what resolved in the last day. | | **Suggestions** | Open [performance](/checks/performance) and [improvement](#self-improving-alerts) suggestions. | | **History** | Resolved and dismissed incidents and suggestions, newest first. | Each view is a list beside a pane. Open items are ordered by severity, then age. Each row shows the headline and one status line: severity, the check (or *External alert* / *Added by hand*), how long ago it opened, and the assignee. Click a row, or move with the **Up** and **Down** keys, to open it in the pane. On a phone the pane opens as a full-screen sheet with **Back to inbox**. **Filter** (above the list) narrows by severity, source (check, external alert, added by hand) and assignee (me, unassigned, anyone). Active filters show as chips you can remove one at a time. The pane shows the details (severity, check, assignee, when it opened), the check's recent results with the incident period shaded, the diagnosis, the timeline and the comments. Change the assignee from the **Assignee** menu in the details. The actions are: * **Incidents:** **Resolve incident** records an [outcome](#resolving-with-an-outcome). The **…** menu snoozes or mutes the check (for everyone or just you — see [Notifications](/alerts/notifications)) and dismisses the incident. * **Suggestions:** **Accept suggestion** or **Dismiss**. To change a check's schedule or quiet windows, follow **Edit schedule on the check**. The pane shows when the check is snoozed and when it resumes. You can link straight to an item: `/inbox?incident=` opens that incident, and `/inbox?check=` opens the check's open incident if it has one. ## Incident lifecycle An incident moves through three states: | State | Meaning | | - | - | | **Open** | The check failed and the incident is new. An alert was sent to the check's [alert group](/alerts/overview). | | **Acknowledged** | Someone has seen it and is looking into it. | | **Resolved** | Closed out, with an **outcome** recorded (see below). | Along the way you can **assign** an incident to a teammate so it has a clear owner. If a failing check recovers on its own, its incident can auto-resolve — so transient blips don't pile up as manual work. ## Performance suggestions Not everything in the Inbox is a failure. When a check's query starts running slowly, Alertee opens a separate **performance** suggestion under **Suggestions** — with index suggestions where it can find them — so you can keep the load on your database light. These auto-resolve when the query is fast again. See [Query performance](/checks/performance). ## AI diagnosis When an incident opens, Alertee runs the failure through an LLM (Claude Sonnet) once and attaches a short, plain-English diagnosis to the incident: * **Execution errors** (timeouts, connection failures, bad credentials, missing tables, SQL errors) get a **what-broke-and-how-to-fix** read — e.g. *"the query hit the 30s timeout scanning `orders` without an index on `created_at`; add `CREATE INDEX ON orders (created_at)`."* It reads your **actual table schema and indexes** (so it won't suggest an index you already have) and reuses the sibling [performance item](/checks/performance)'s EXPLAIN output where one exists. * **Condition breaches** get a **why-this-fired** read — and, for checks you manage yourself, a concrete suggestion (tune the threshold, rewrite the query, or hand the check to Alertee). The diagnosis is **advisory** — a starting point to check against your data, not a verdict. It also rides along on the alert itself: Slack, email, and webhook notifications carry the summary when it's ready (the very first alert may beat it by a second; reminders and re-fires carry it). Every diagnosis is computed **fresh against the live incident** — Alertee never shows you a stale, cached answer (the whole point is that your data is live). It simply doesn't run on every fire: it runs only when an incident opens or reopens, a flapping check is re-diagnosed **at most once an hour**, and never on a healthy run or a re-fire of an already-open incident. ## Resolving with an outcome When you resolve an incident you classify what it actually was. The outcome is the signal Alertee uses to reduce noise: | Outcome | Use when… | | - | - | | **Fixed** | It was a real problem and you addressed it. | | **Transient** | It cleared on its own; nothing to do. | | **Expected** | The condition was met but it's normal (a known batch window, a planned spike). | | **Suppressed / noisy** | The check is firing too often to be useful as-is. | | **Duplicate** | Already tracked by another incident. | | **Check changed** | Resolved because the check itself was edited. | ## Comments Every incident has a comment thread. Use it to keep the *why* with the incident: what was actually wrong, what you changed to fix it, anything the next person (or an AI agent) should know if the same check fires again. Comments live on the incident forever, so past incidents on a check become a searchable history of diagnoses and fixes. By default a comment is **emailed to the email channels of the check's alert group** — the same people who got the alert — so the team sees updates without being CC'd manually. Posting from the CLI (`alertee inbox comment "…"`) or the `comment_on_inbox_item` MCP tool works the same way; pass `--no-notify` / `notify=false` for a silent note. You can **edit or delete your own comments** — to fix a typo or refine a diagnosis rather than appending a correction. Editing shows an "edited" marker and does not re-send the email. From the CLI use `alertee inbox edit-comment "…"` and `alertee inbox delete-comment `, or the `edit_inbox_comment` / `delete_inbox_comment` MCP tools (you can only edit or delete comments you authored). Notes attached when acknowledging or resolving an incident also land in the comment thread. To revisit a specific check's history, filter the incident list to that check (`alertee inbox list --check --status resolved`, or the `check_id` parameter on the `list_inbox` MCP tool) and read the comments on each past incident — the diagnoses and fixes travel with the check. ## Self-improving alerts Alertee watches the pattern of incidents and outcomes per check. When a check is **noisy** — lots of incidents that resolve fast, get marked transient, or get ignored — the LLM looks at the whole picture (the SQL, the schedule, when and how often it fires, how you've been resolving it) and decides the single most useful fix, or that the noise is legitimate and nothing should change. When it has a suggestion it raises an **improvement** under **Suggestions**: a concrete, one-click change such as widening the grace period, setting a [quiet window](/checks/scheduling), or converting the check to a baseline-aware [managed check](/checks/managed), with the reasoning attached. You accept or dismiss it; nothing changes without your decision. This is the feedback loop: incidents → outcomes → fewer, better alerts over time. ## Daily digest Instead of (or alongside) per-incident notifications, you can receive a **daily digest** summarizing the day's incidents and their state. Configure it under **Settings → Alerts → Daily Slack digest**. ## External alerts The Inbox isn't only for Alertee's own checks. An external tool can open an incident by POSTing to an inbound **webhook receiver** URL, so your data incidents live in one place. Create a receiver from the CLI (or the `create_webhook_receiver` MCP tool) — it prints the URL to POST to: ```bash theme={null} alertee receivers create --name "Cron jobs" --severity warning # → prints the inbound URL: POST incidents to …/webhooks/ curl -X POST -H "Content-Type: application/json" \ -d '{"title":"Nightly backup failed","severity":"critical","dedup_key":"backup"}' ``` See [CLI commands](/cli/commands) for `receivers` and `inbox`, or the [MCP tools](/mcp/tools). ## Related * [Checks overview](/checks/overview) — what produces an incident * [Alert groups](/alerts/overview) — where the notification is delivered * [Investigate alerts with an agent](/mcp/investigate-alerts) — hand an incident to an AI agent over MCP # Introduction Source: https://docs.alertee.io/introduction Monitor your database for problems before your users find them. Alertee watches your databases and alerts you the moment something looks wrong — a table that stopped receiving rows, a metric that crossed a threshold, a dimension that suddenly disappeared. It's for the failure mode uptime monitors miss: the app is up, but the database says the outcome stopped happening. ## How it works A **check** is a SQL query that runs on a schedule and evaluates its result against a condition. When the condition is breached, Alertee opens an **incident** in your Inbox and notifies your team — via email, Slack, or webhook. You get a check two ways, and you choose per check: * **Write it yourself.** Plain SQL plus a condition. It stays yours — Alertee never edits it. * **Let Alertee's agent author it.** Connect a database (or describe what you want in plain English) and the agent inspects your schema, drafts a baseline-aware query, picks a threshold, and keeps it tuned on a review cadence. Checks the agent owns are marked **managed by Alertee**. See [Managed checks](/checks/managed). ```sql theme={null} -- Example: alert if no orders have been placed in the last 10 minutes SELECT COUNT(*) FROM orders WHERE created_at > NOW() - INTERVAL '10 minutes' ``` Set a condition of **greater than 0** — the healthy state is "at least one order" — and Alertee opens an incident if that count ever hits zero. When you resolve an incident you classify the outcome — real, transient, expected, or noisy. Alertee uses those outcomes to cut future noise. See [the Inbox](/inbox/overview). ## Beyond the database Data quality is the core, but a check doesn't have to be SQL. Point one at a **URL or API endpoint** to catch downtime, slow responses, or a bad status code, or have a scheduled job send a **heartbeat** so Alertee alerts the moment that job stops checking in. And if credentials can't leave your network at all, run the query yourself and **push** us the number — we alert on it exactly the same way. Same conditions, same Inbox, same alerts. ## Key concepts > **[Checks](/checks/overview)** > > A check is a SQL query + a condition + a schedule. It's the core building block. > **[Managed checks](/checks/managed)** > > Let Alertee's agent author a baseline-aware check from your schema and keep it tuned. > **[Inbox](/inbox/overview)** > > Failed checks become incidents you acknowledge, assign, resolve, and classify. > **[Connections](/checks/overview#connections)** > > An encrypted, read-only link to a PostgreSQL or ClickHouse database. > **[Alert groups](/alerts/overview)** > > Group your notification channels (email, Slack, webhook) and assign them to checks. > **[CLI & MCP](/cli/installation)** > > Drive Alertee from your terminal or an AI agent over MCP. ## Finding your way around the app The sidebar is the app's navigation: * **Inbox** opens the incidents that need you. Its count shows open incidents that are unassigned or assigned to you. **Suggestions** and **History** sit under it. * **Checks** lists everything you monitor. * **Settings**, at the bottom, opens your organization, team, connections, alerts, notifications, billing and API tokens. Your account menu (theme, support, sign out) sits below it. Press ⌘K (Ctrl K on Windows and Linux) to jump to any page, settings section or check by name, or to add a check. Press g then i for the Inbox, or g then c for Checks. # Investigate alerts with an AI agent Source: https://docs.alertee.io/mcp/investigate-alerts Fire a webhook on alert, then let an AI agent pull the SQL, status, and recent history over MCP and investigate on its own. Alertee alerts can do more than land in an inbox. Add a **webhook** to an alert group and every alert POSTs a small JSON payload to a URL you control. Point that URL at an AI agent and it can investigate the alert itself — pulling the check's SQL, its recent run history, and the failing data over the [MCP server](/mcp/overview). The webhook is the trigger; MCP is how the agent gets the detail. The payload stays small on purpose — the agent fetches live state at investigation time rather than relying on a snapshot frozen when the alert fired. ## 1. Add a webhook to an alert group In the dashboard, open the alert group and add a **Webhook** channel with the URL the agent listens on. Webhooks sit alongside email and Slack — an alert fans out to every channel in the group. The request is a `POST` with `Content-Type: application/json` and a `User-Agent` of `Alertee-Webhook/1.0`. Custom headers (for example an `Authorization` bearer token so your endpoint can trust the call) are supported on the channel config. ## 2. The webhook payload Every alert delivers this JSON body: ```json theme={null} { "alert_id": "f1c2…", "timestamp": "2026-06-02T14:31:00Z", "check_id": "9a8b…", "check_name": "Failed payments (last hour)", "status": "failure", "alert_level": "critical", "message": "Failed payments exceeded 10 in the last hour", "description": "Watches the payments table for spikes in declines", "org_id": "3d4e…", "data_timestamp": "2026-06-02T14:30:00Z", "issue_id": "7b6c…" } ``` | Field | Description | | - | - | | `alert_id` | Unique id for this alert event | | `timestamp` | When the alert was sent (RFC 3339, UTC) | | `check_id` | The check that fired — **the handle the agent uses with MCP** | | `check_name` | Human-readable check name | | `status` | `failure`, `success`, or `error` | | `alert_level` | `info`, `warning`, or `critical` | | `message` | The alert message | | `description` | The check's description, if set | | `org_id` | Organization the check belongs to | | `data_timestamp` | When the underlying data was sampled (RFC 3339, UTC) | | `issue_id` | Present only when the alert is linked to an incident | The payload intentionally carries metadata, not the SQL or the data. The agent fetches those in the next step using `check_id`. ## 3. Let the agent investigate over MCP Connect your agent to the [Alertee MCP server](/mcp/setup), then have it call two tools with the `check_id` from the webhook. ### `get_check` — the definition Returns the check's full configuration, including the SQL it runs: ```json theme={null} { "ID": "9a8b…", "Name": "Failed payments (last hour)", "Query": "SELECT count(*) AS value FROM payments WHERE status = 'failed' AND created_at > now() - interval '1 hour'", "Condition": { "type": "greater_than", "value": "10" }, "AlertLevel": { "AlertLevel": "critical", "Valid": true }, "Interval": { "CheckInterval": "five_minutes", "Valid": true }, "Description": { "String": "Watches the payments table for spikes in declines", "Valid": true } } ``` `Query` is the exact SQL — the agent can read it, reason about it, or run it against the source database itself. ### `get_check_history` — what's been happening Returns recent runs (default the last 24 hours; pass `hours` to widen the window): ```json theme={null} [ { "ID": "…", "CheckID": "9a8b…", "Status": "failure", "CheckedAt": "2026-06-02T14:30:00Z", "DataTimestamp": { "Time": "2026-06-02T14:30:00Z", "Valid": true }, "Details": { "value": 23, "threshold": 10 }, "Results": [{ "value": 23 }] }, { "ID": "…", "CheckID": "9a8b…", "Status": "success", "CheckedAt": "2026-06-02T14:25:00Z", "Details": { "value": 4, "threshold": 10 } } ] ``` Each entry carries the run `Status` and timestamps. `Details` holds the condition evaluation (the value seen versus the threshold), and `Results` holds the query rows captured for that run when available — so the agent can see not just *that* it failed but *when it started* and *by how much*. ### A sample agent prompt > An Alertee alert just fired. Here is the webhook payload: `{…}`. > Use `get_check` to read the SQL and `get_check_history` to see the last several runs, > passing the payload's `org_id` as `organization_id` so you read the right organization. > Tell me when the failure started, whether it's a spike or a steady climb, and your best > guess at the cause. With `get_check` + `get_check_history` the agent has the SQL, the recent statuses, and the failing values — enough to triage before a human even opens the dashboard. ## If you belong to more than one organization Every MCP tool takes an optional **`organization_id`**. Omit it and the tool uses your default org; pass it and the tool acts in that org — so a single agent works across all your organizations without re-linking or restarting. The alert webhook already carries the org: pass its **`org_id`** straight through as `organization_id`: ``` get_check(check_id: "9a8b…", organization_id: "") ``` If you don't have the org id, call **`list_organizations`** to see the ones you belong to and their ids. You can only ever act in organizations you're a member of — the backend re-checks your membership and role on every call, whatever `organization_id` you pass. > [!NOTE] > > The CLI also supports a per-command `alertee --org …` override, and `alertee link` > still sets a persistent default. MCP can't persist a link (each call is stateless), so > it names the org per call via `organization_id` instead. ## Next step [Connect a client →](/mcp/setup) · [Tools reference →](/mcp/tools) # MCP server overview Source: https://docs.alertee.io/mcp/overview Use Alertee from within Claude, Codex, Cursor, and other AI assistants. The Alertee MCP (Model Context Protocol) server lets AI assistants — like Claude, Codex, and Cursor — create and manage Alertee checks as part of their workflow. ## The use case You're debugging a bug in another project's session. You notice a pattern that could cause problems in production. Instead of switching context to open the Alertee dashboard, you just ask your assistant: > "Create an Alertee check that alerts if failed payments exceed 10 in the last hour." It calls the `create_check` tool, connects to your organization, and creates the check — all without you leaving your current session. It also works the other way: an alert can fire a webhook that hands an AI agent the check, and the agent uses MCP to pull the SQL, recent history, and failing data and investigate on its own. See [Investigate alerts with an AI agent](/mcp/investigate-alerts). ## Two ways to connect | | Remote (hosted) | Local (CLI) | | - | - | - | | **Best for** | Anyone — no install | CLI / terminal users | | **Setup** | Paste a URL, sign in via browser | `alertee login` + `alertee link` | | **Auth** | Browser sign-in (OAuth), per-user | Reuses your CLI token | | **Transport** | Hosted HTTP at `https://app.alertee.app/mcp` | stdio subprocess (`npx @alertee/cli mcp`) | Most people should use the **remote** server — there's nothing to install. If you already live in the CLI, the **local** server reuses your existing login. Both expose the same tools. [Connect a client →](/mcp/setup) ## How the remote server works You add the URL to your AI client and it opens a browser window to sign in to Alertee and approve access — the same OAuth flow you'd expect from any "Connect your account" button. Once approved, the client connects and can call tools on your behalf, against your **default organization**. Nothing to install. ## How the local server works The local server runs alongside your client and reuses your Alertee CLI login — no extra setup once you've run `alertee login` and `alertee link`. ## Available tools | Tool | Description | | - | - | | `list_checks` | List all checks in your organization | | `get_check` | Get a single check's full detail | | `get_check_history` | Get a check's recent run history | | `run_check` | Run a check immediately and return the result | | `create_check` | Create a new check (single-value or multi-dimensional grid) | | `update_check` | Update a check — rename, retune, pause, mute alerts, or change its schedule | | `delete_check` | Delete a check | | `snooze_check` | Temporarily silence a check's alerts (auto-expires) | | `set_check_schedule` | Set/clear a check's custom active schedule (e.g. only run during market hours) | | `list_connections` | List available database connections | | `create_connection` | Add a database connection (tested before saving) | | `test_connection` | Test an existing database connection | | `preview_api_metric` | Probe a JSON API and list its extractable gjson paths (for authoring an api\_metric check) | | `list_organizations` | List organizations you belong to | | `create_organization` | Create a new organization | | `list_alert_groups` | List alert groups | | `create_alert_group` | Create an alert group | | `delete_alert_group` | Delete an alert group | | `send_test_alert` | Send a test alert through a group's real channels to verify delivery | | `list_alert_recipients` | List a group's recipients (channels) | | `add_alert_recipient` | Add a webhook or email-group recipient to a group | | `remove_alert_recipient` | Remove a recipient from a group | | `list_email_groups` | List email groups (recipient lists) | | `create_email_group` | Create an email group | | `delete_email_group` | Delete an email group | | `add_email_group_members` | Add email addresses to an email group | | `remove_email_group_member` | Remove an email address from an email group | | `list_inbox` | List inbox items (incidents) | | `get_inbox_item` | Get a single incident + timeline | | `acknowledge_inbox_item` | Acknowledge an incident | | `resolve_inbox_item` | Resolve an incident | | `get_inbox_digest` | Get the inbox digest (briefing + counts) | | `list_webhook_receivers` | List inbound webhook receivers | | `create_webhook_receiver` | Create an inbound webhook receiver | | `delete_webhook_receiver` | Delete an inbound webhook receiver | See the [tools reference](/mcp/tools) for full parameter details. ## Next step [Connect a client →](/mcp/setup) # Setup Source: https://docs.alertee.io/mcp/setup Connect Alertee to Claude, Codex, Cursor, and other AI assistants. There are two ways to connect, depending on whether you use the CLI. Both expose the [same tools](/mcp/tools). ## Remote server (recommended) Nothing to install — point your client at the hosted URL and sign in through the browser. The first time you connect, a browser window opens to sign in to Alertee and approve access. After that the client stays connected, and tool calls run against your **default organization**. **URL** ``` https://app.alertee.app/mcp ``` Pick your client: **Claude Code** ```bash theme={null} claude mcp add --transport http alertee https://app.alertee.app/mcp ``` Add `--scope user` to make it available in every project instead of just the current one. Then run `/mcp` inside Claude Code to trigger the browser sign-in. **Codex** ```bash theme={null} codex mcp add alertee --url https://app.alertee.app/mcp ``` Then authenticate: ```bash theme={null} codex mcp login alertee ``` **Cursor** Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in your project: ```json theme={null} { "mcpServers": { "alertee": { "url": "https://app.alertee.app/mcp" } } } ``` **Claude Desktop** Settings → **Connectors** → **Add custom connector**, give it the name `Alertee`, paste the URL, and follow the browser sign-in. ``` https://app.alertee.app/mcp ``` **VS Code** ```bash theme={null} code --add-mcp '{"name":"alertee","type":"http","url":"https://app.alertee.app/mcp"}' ``` Prefer a file you can commit? Add to `.vscode/mcp.json` in your project: ```json theme={null} { "servers": { "alertee": { "type": "http", "url": "https://app.alertee.app/mcp" } } } ``` **Windsurf** Add to `~/.codeium/windsurf/mcp_config.json`: ```json theme={null} { "mcpServers": { "alertee": { "serverUrl": "https://app.alertee.app/mcp" } } } ``` ## Local server (CLI users) If you already use the Alertee CLI, run the MCP server locally — it reuses your existing login, so there's no separate browser sign-in. **Prerequisites** 1. [Install the Alertee CLI](/cli/installation) 2. [Log in and link an organization](/cli/authentication) **Claude Code** ```bash theme={null} claude mcp add alertee -- npx @alertee/cli mcp ``` If you installed the CLI globally, use `claude mcp add alertee -- alertee mcp`. **Codex** ```bash theme={null} codex mcp add alertee -- npx @alertee/cli mcp ``` If you installed the CLI globally, use `codex mcp add alertee -- alertee mcp`. **JSON config** Add to `.mcp.json` in your project root (or globally at `~/.claude/mcp.json`, `~/.cursor/mcp.json`, etc.): ```json theme={null} { "mcpServers": { "alertee": { "command": "npx", "args": ["@alertee/cli", "mcp"] } } } ``` If you've installed the CLI globally, use `"command": "alertee"` with `"args": ["mcp"]`. The local server uses the same credentials as the CLI, stored at `~/.config/alertee/config.json`. To switch organizations, run `alertee link`; to switch between multiple Alertee accounts, run `alertee auth switch` — the server picks up the active account on the next tool call, no restart needed. To pin a server to one account, add `"env": {"ALERTEE_ACCOUNT": "you@acme.com"}` to its config block. ## Verify Start a new session in your client. You should see Alertee listed as an available MCP server. Ask it: > "List my Alertee checks." It will call `list_checks` and return your current checks. # Tools reference Source: https://docs.alertee.io/mcp/tools All tools exposed by the Alertee MCP server. > [!NOTE] > > **Working across organizations.** Every tool below (except `list_organizations` and > `create_organization`) accepts an optional **`organization_id`**. Omit it to use your > default org; pass it to act in a specific one — so one agent spans all your > organizations. Use `list_organizations` to find the ids, or pass the `org_id` from an > alert webhook straight through. You can only act in organizations you belong to; the > backend re-checks your membership and role on every call. It's listed explicitly in the > tables only where it's most commonly needed. ## `list_checks` List all checks in the linked organization. **Parameters:** none **Example prompt:** > "Show me all my Alertee checks." / "Which of my checks are currently silenced?" **Returns:** Array of check objects (id, name, status, interval, connection, query, …). Each is annotated with **`quiet_now`** (alerts currently suppressed) and **`quiet_reason`** (e.g. a snooze, a calendar holiday, or off-hours), so you can see what's silenced without a `get_check` per check. *** ## `get_check` Get a single check's full detail. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | **Returns:** The check object, plus a **`schedule`** field — the resolved view of the check's calendar, durable quiet window, active snooze, and whether it is `quiet_now` (with a `summary` and `quiet_reason`). Calendar/quiet/snooze are stored separately, so this is how you confirm what scheduling is actually in force. `quiet_now` is computed by the same logic the monitor uses to suppress, so it never disagrees with real behaviour. The `snooze_check`, `set_check_schedule`, and `update_check` (calendar) tools echo the same `schedule` back, so you can verify a write without a second call. It also returns the effective **`webhook_payload_config`** (`include_query`, `include_result_rows`, `max_rows`) — what [webhook alerts](/alerts/overview#the-webhook-payload) will include for this check. For a [push check](/checks/push) it additionally returns **`ingest_url`** — where the user's job POSTs its number — so you can hand it back after the create call. *** ## `get_check_history` Get a check's recent run history (status over time). **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | | `hours` | number | | How many hours back to fetch (default 24) | | `summary` | boolean | | Return a compact digest instead of every raw run (default `true`) | | `limit` | number | | When `summary=false`, cap the most-recent raw runs returned (default 200) | **Example prompt:** > "How has my 'orders' check been doing over the last day?" **Returns:** By default, `{ summary, snooze_events }` — `summary` is a digest (`totalRuns`, `statusCounts`, status `transitions`, `durationMs` stats, and the last 10 `recent` runs) so it stays small. With `summary=false`, returns `{ results, truncated, total, snooze_events }` where `results` is the raw run rows (`Status`, `CheckedAt`, details). `snooze_events` lists when the check was manually snoozed, until when, and why. *** ## `get_check_changelog` Get a check's **change history** — what changed about its *configuration*, when, and by whom. This is distinct from `get_check_history`, which is run/status history. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | | `limit` | number | | Max entries to return (default 50) | **Example prompt:** > "What changed on my 'optionchain equities' check recently?" **Returns:** `{ entries }` — a newest-first timeline. Each entry has `at`, `actor`, `summary`, and `kind`, one of: * **`config`** — a human/agent edit through `update_check` (query, condition, interval, cron schedule, alert routing, grace period). Carries `fields` with `before`/`after` for each changed field. * **`ai_review`** — an Alertee-authored rewrite of a managed check. Carries the `reasoning` and the query/condition diff. * **`schedule`** — a calendar, quiet-window, or snooze change (e.g. "Set calendar: NYSE calendar"). *** ## `run_check` Run a check immediately and return the result — useful for testing a check without waiting for its schedule. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | **Returns:** `{ verdict, success, result }` (or `{ success: false, error }` if it couldn't run). `verdict` is a plain-English summary that states whether the check is **healthy** or **alerting** and what "healthy" means here (e.g. `HEALTHY — Value 12.00 is greater than 0.00 (healthy when value > 0)`), so the comparison's polarity is never a guess — the condition describes the healthy state and the check alerts on violation. *** ## `get_plan` Show the organization's plan and usage — so you can check there's headroom before creating checks or connections. **Parameters:** none (accepts `organization_id`) **Example prompt:** > "What plan am I on, and do I have room for more checks?" **Returns:** `{ plan, subscription_status, checks: { used, limit }, data_sources: { used, limit }, min_interval_minutes }`. Free organizations report the free plan and its limits. *** ## `create_check` Create a new check. Pick `check_type`: **`sql`** (default — a database query, single-value or grid), **`http`** (a website/API endpoint), **`api_metric`** (track a number from a JSON API — see [API metric checks](/checks/api-metrics)), **`heartbeat`** (a dead-man's-switch for a cron job), or **`push`** (the user's own cron POSTs a number to us — no credentials, works from a private network; see [push checks](/checks/push)). See [Check types](/checks/check-types). **Common parameters:** | Name | Type | Required | Description | | - | - | - | - | | `name` | string | ✓ | Human-readable name for the check | | `check_type` | string | | `sql` (default), `http`, `api_metric`, `heartbeat`, or `push` | | `interval_minutes` | number | ✓ | `1`, `5`, `15`, `30`, or `60` | | `alert_group_id` | string | | Route alerts to this alert group (defaults to the org default group) | | `calendar` | string | | Follow a calendar so the check is quiet on its closed days: `NYSE`, `LSE`, `TSX`, `XETRA`, `EURONEXT`, `UK` | | `alerts_enabled` | boolean | | `false` to create the check **muted** — it runs and updates status but sends no alerts until unmuted. Default: alerts on | | `grace_period_enabled` | boolean | | Tolerate transient failures before alerting (for spiky metrics). See [grace periods](/checks/grace-periods) | | `grace_period` | number | | Failures to tolerate before alerting (e.g. `2`–`3`) | | `grace_period_type` | string | | `consecutive` (default) or `within_window` | | `grace_period_window` | number | | Window in minutes for `within_window` grace | | `include_query` | boolean | | Include the check's SQL query in [webhook alerts](/alerts/overview#the-webhook-payload). Default: `true` | | `include_result_rows` | boolean | | Include the raw failing rows in webhook alerts. Default: `false` — rows may contain sensitive/PII data | | `max_rows` | number | | Cap on failing rows sent when `include_result_rows` is `true` (default 20) | | `organization_id` | string | | Target organization (e.g. one just returned by `create_organization`). Defaults to your default organization | **SQL checks (`check_type: sql`):** | Name | Type | Required | Description | | - | - | - | - | | `connection_id` | string | ✓ | ID of the database connection (use `list_connections` to find IDs) | | `query` | string | ✓ | Single-value: SQL returning one value. Grid: SQL returning `name` and `value` columns, one row per dimension | | `evaluation_type` | string | | Grid check only (omit for single-value). `condition_type` describes each cell's **healthy** state; the check alerts on cells that violate it. See the polarity note below | | `condition_type` | string | † | The **healthy** condition; the check alerts when it's violated. Numeric: `greater_than`, `less_than`, `greater_or_equal`, `less_or_equal`, `equals`, `not_equals` (use `threshold`). Also `between`/`not_between` (`min_value`+`max_value`), `contains`/`regex` (`match_value`), `timestamp_age` (`threshold` = max data age in **minutes**, query returns a timestamp), `is_null`, `is_not_null`, `exists` | | `threshold` | number | † | Comparison value, or the max age in minutes for `timestamp_age` | | `match_value` | string | | Substring (`contains`), pattern (`regex`), or string value (`equals`/`not_equals`) | | `min_value` / `max_value` | number | | Range bounds for `between` / `not_between` | | `thresholds` | array | | [Escalation levels](/checks/conditions#escalation-thresholds) on top of the primary condition (single-value only): `[{condition_type, threshold, alert_level}]`. Worst violated level wins; crossing a worse threshold escalates the open incident and re-alerts | | `severity` | string | | Grid only: `info`, `warning` (default), or `critical` — status applied to matching cells | | `custom_message` | string | | Custom alert/incident message (any check type), replacing the auto-generated text. Supports `{check_name}`, `{value}`, `{threshold}` templating (`{name}` = dimension for grid cells). See [custom alert messages](/checks/conditions#custom-alert-messages) | | `label_query` | string | | Grid only: SQL returning `name` and `label` columns to map dimension keys to display names | | `description` | string | | Short author note on what the check covers and why. Also fed to Alertee's [AI incident advisory](/inbox/overview) as domain context (e.g. expected data cadence), so it diagnoses from your intent | | `documentation` | string | | Longer-form runbook / notes for the check | | `justification` | string | | Why the check exists (rationale) | † For a single-value check, `condition_type` (plus its value field) is required. Grid `any_cell`/`all_cells` need `condition_type`+`threshold` (numeric comparisons only); `dimension_missing`/`dimension_added` need neither. **Website / API checks (`check_type: http`):** | Name | Type | Required | Description | | - | - | - | - | | `url` | string | ✓ | The URL to request | | `http_method` | string | | `GET` (default), `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE` | | `expected_status` | number | | Status code that means healthy (default: any 2xx) | | `timeout_seconds` | number | | Request timeout (default 30) | | `max_response_time_ms` | number | | Alert if the response is slower than this | | `body_contains` | string | | Alert unless the response body contains this string | | `ssl_expiry_days` | number | | For `https`, alert if the TLS cert expires within this many days | | `headers` | object | | Optional request headers | | `request_body` | string | | Optional request body (POST/PUT/PATCH) | **API metric checks (`check_type: api_metric`):** fetches a JSON API, extracts a value, and evaluates it like a SQL single-value check (the condition fields above apply; they're optional — without one the check just verifies fetch + extraction). A `value_path` yielding `[{name,value},…]` rows makes it a grid check (set `evaluation_type`). | Name | Type | Required | Description | | - | - | - | - | | `url` | string | ✓ | The JSON API endpoint to fetch | | `value_path` | string | | gjson path to the metric, e.g. `usage.total` or `data.0.count`; alias into a grid with `days.#.{name:date,value:minutes}`. Blank = the body is the value | | `headers` | object | | Request headers, e.g. `{"Authorization": "Bearer "}` — use a scoped read-only token | | `http_method` | string | | `GET` (default); Connect/gRPC-style APIs need `POST` | | `request_body` | string | | Request body for POST/PUT/PATCH | | `query_params` | object | | URL query params, URL-encoded for you (e.g. Tinybird `{"q": "SELECT …"}`) | | `expected_status` | number | | Status code that means healthy (default: any 2xx) | | `timeout_seconds` | number | | Request timeout (default 30) | **Heartbeat checks (`check_type: heartbeat`):** the response includes a `heartbeat_url` your job should call on success. | Name | Type | Required | Description | | - | - | - | - | | `expected_interval_mins` | number | | Alert if no ping arrives within this many minutes (default 60) | | `grace_period_mins` | number | | Extra minutes to wait past the interval before alerting | | `last_ping_status_to_require` | string | | Required status of the latest ping (default `success`) | **Push checks (`check_type: push`):** the response includes an `ingest_url`, an `ingest_token`, and an `example_curl` — relay them to the user, since nothing is monitored until their job POSTs to that URL. There is no auth header: the token in the URL is the credential, so treat it as a secret. Push checks **do** take a condition: the pushed number is evaluated against `condition_type` + `threshold` (or `evaluation_type` for a grid push) the instant it arrives, exactly like a `sql` check. The condition describes the **healthy** state and the check alerts when it's violated. Body shapes are `{"value": 42}` for a single value and `{"rows": [{"name": "eu-west", "value": 12}]}` for a grid. | Name | Type | Required | Description | | - | - | - | - | | `staleness_mins` | number | | The dead-man window — alert if no value is pushed within this many minutes (default 60) | The ingest token is minted by the server and preserved across updates, so it is never set by the caller. **Grid polarity — read before choosing `evaluation_type`:** | `evaluation_type` | Healthy when | **Alerts when** | | - | - | - | | `all_cells` | **every** cell satisfies the comparison | **any** cell fails — e.g. `greater_than 0` → alert if *any* feed is empty. Use for "every store/region/feed must have data" | | `any_cell` | **at least one** cell satisfies | **every** cell fails — e.g. `greater_than 0` → alert only when *all* cells are zero. Use for "at least one replica/source must be healthy" | | `dimension_missing` | all expected dimensions present | an expected dimension stops appearing (no `condition_type` needed) | | `dimension_added` | only known dimensions present | an unexpected new dimension appears (no `condition_type` needed) | **Example — single value:** > "Create an Alertee check that alerts if there are no new orders in the last 5 minutes. Use the production Postgres connection." Claude will call `list_connections`, then `create_check` with a `greater_than 0` condition (healthy while at least one order arrives) and a 5-minute interval. **Example — grid:** > "Monitor orders per store: alert if any store has fewer than 5 orders in the last 15 minutes." Claude will call `create_check` with a `SELECT store_id AS name, COUNT(*) AS value … GROUP BY store_id` query, `evaluation_type: all_cells`, `condition_type: greater_or_equal`, `threshold: 5` — every store's count must stay ≥ 5, so the check alerts the moment any store drops below it. **Example — website:** > "Add a check that alerts if alertee.io stops returning 200 or gets slow." Claude will call `create_check` with `check_type: http`, `url: https://alertee.io`, `expected_status: 200`, and `max_response_time_ms`. **Example — API metric:** > "Watch our cloud compute usage and alert if we burn past 50k minutes this month." Claude will call `create_check` with `check_type: api_metric`, your provider's usage endpoint as the `url`, your token in `headers`, a `value_path` pointing at the month-to-date figure, and a `less_than 50000` condition (healthy while under budget). **Example — heartbeat:** > "Set up a heartbeat for my nightly ETL — it should run once a day." Claude will call `create_check` with `check_type: heartbeat` and `expected_interval_mins: 1440`, then hand you back the `heartbeat_url` to `curl` at the end of the job. **Example — push:** > "I can't give you database credentials. I'll run the query myself — alert me if my hourly order count drops below 100." Claude will call `create_check` with `check_type: push`, `condition_type: greater_or_equal`, `threshold: 100` (healthy at 100 or more, alerting at 99) and a `staleness_mins` window, then hand you back the `ingest_url` and the `curl` one-liner to add to your cron. *** ## `update_check` Update a check. This is a **partial update** — only the fields you pass change; everything else is left untouched. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | | `name` | string | | New name | | `query` | string | | New SQL query | | `staleness_mins` | number | | Push checks: retune the dead-man window (minutes). The existing ingest URL keeps working | | `label_query` | string | | New grid label-mapping query (`name` → `label`) | | `interval_minutes` | number | | `1`, `5`, `15`, `30`, or `60` | | `alert_level` | string | | `info`, `warning`, `error`, or `critical` | | `enabled` | boolean | | `true` to enable, `false` to pause (stops running) | | `alerts_enabled` | boolean | | `false` to mute, `true` to unmute. Muted = keeps running and updating status, but sends no alerts | | `evaluation_type` | string | | Replace the condition with a grid condition of this type | | `condition_type` | string | | Replace the condition — any single-value type (`greater_than`, `between`, `contains`, `regex`, `timestamp_age`, `is_null`, …) or, with `evaluation_type`, the per-cell comparison. See [`create_check`](#create-check) | | `threshold` / `match_value` / `min_value` / `max_value` | number / string | | The replacement condition's value fields (per its `condition_type`) | | `severity` | string | | Grid-only: cell severity for the replacement condition | | `custom_message` | string | | Custom alert/incident message (any check type). Settable **on its own** — no need to re-send the condition; pass `""` to clear. Supports `{check_name}`, `{value}`, `{threshold}` (`{name}` = grid dimension). See [custom alert messages](/checks/conditions#custom-alert-messages) | | `description` | string | | Short author note on what the check covers and why. Also fed to Alertee's [AI incident advisory](/inbox/overview) as domain context (e.g. expected data cadence). Settable on its own; pass `""` to clear | | `documentation` | string | | Longer-form runbook / notes. Pass `""` to clear | | `justification` | string | | Why the check exists (rationale). Pass `""` to clear | | `managed_by` | string | | `user` or `alertee` — who maintains the check | | `calendar` | string | | Follow a calendar: `NYSE`, `LSE`, `TSX`, `XETRA`, `EURONEXT`, `UK` | | `clear_calendar` | boolean | | Stop following a calendar | | `grace_period_enabled` | boolean | | Tolerate transient failures before alerting. See [grace periods](/checks/grace-periods) | | `grace_period` | number | | Failures to tolerate before alerting | | `grace_period_type` | string | | `consecutive` (default) or `within_window` | | `grace_period_window` | number | | Window in minutes for `within_window` grace | | `include_query` | boolean | | Include the SQL query in [webhook alerts](/alerts/overview#the-webhook-payload) (default `true`) | | `include_result_rows` | boolean | | Include raw failing rows in webhook alerts (default `false` — may contain sensitive data) | | `max_rows` | number | | Cap on failing rows sent when `include_result_rows` is `true` (default 20) | The condition fields, **if provided, replace the whole condition** — call `get_check` first if you only want to tweak part of it. `managed_by: alertee` hands the check to Alertee, which re-authors and re-reviews it on a cadence. `calendar` keeps the check quiet on that calendar's closed days — weekends and its holidays (`NYSE` = US market holidays, `UK` = UK bank holidays). It's **day-level only**: time-of-day stays with the check's custom schedule, and the two compose. **Example prompts:** > "Pause the 'Replication lag' check." → `update_check` with `enabled: false`. > "Mute alerts for the 'orders' check while I tune it." → `update_check` with `alerts_enabled: false`. > "Don't alert on the latency check unless it fails 3 times in a row." → `update_check` with `grace_period_enabled: true`, `grace_period: 3`, `grace_period_type: consecutive`. > "Have Alertee manage the 'orders' check and follow the NYSE calendar." → `update_check` with `managed_by: alertee`, `calendar: NYSE`. *** ## `delete_check` Delete a check by ID. **This cannot be undone.** **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | **Returns:** `{ success: true }`. *** ## `suggest_check_schedule` Analyse a check's run history and suggest an active schedule (when the feed normally has data). A suggestion only — pass `apply: true` to set it as the check's custom schedule. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | | `days` | number | | History window to analyse (default 30) | | `timezone` | string | | Timezone for the suggested schedule (default `America/New_York`) | | `apply` | boolean | | Apply the suggestion as the check's custom schedule | *** ## `snooze_check` Temporarily silence a check's alerts. Defaults to the rest of the local day and **auto-expires**; end it early with `unsnooze_check`. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | | `until` | string | | ISO 8601 timestamp to snooze until (default: end of the local day) | | `timezone` | string | | IANA timezone for the local day, e.g. `America/New_York` (default) | | `reason` | string | | Why the check is being snoozed | **Example prompt:** > "Snooze the 'replication lag' check for the rest of the day — we're doing a migration." **Returns:** `{ success, schedule }` — the resolved schedule, so you can confirm the snooze and its `snoozed_until`. *** ## `unsnooze_check` End a check's active snooze immediately, so its alerts resume now instead of waiting for the snooze to expire. No-op if the check isn't snoozed. Leaves recurring quiet windows and calendars untouched. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | **Example prompt:** > "The migration's done — un-snooze the replication lag check." **Returns:** `{ success, schedule }`. *** ## `set_check_schedule` Set or clear a check's **custom schedule** — the recurring hours/days it's expected to be active. Outside it the check is skipped, so it won't alert. This handles **time-of-day**; to also stay quiet on a calendar's holidays (and weekends), attach a `calendar` via `update_check` — the two compose. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Check ID | | `before` | string | † | `HH:MM` — stay quiet before this local time (e.g. `09:30`) | | `after` | string | † | `HH:MM` — stay quiet after this local time (e.g. `16:00`) | | `weekdays` | boolean | | Restrict active hours to Mon–Fri and stay quiet all weekend | | `timezone` | string | | IANA timezone, e.g. `America/New_York` (default) | | `reason` | string | | Why the window exists | | `clear` | boolean | | Remove the existing custom schedule | † Provide `before` and/or `after`, **or** `clear: true`. **Example prompt:** > "Only alert on the 'option chain has rows' check during US market hours." → `set_check_schedule` with `before: 09:30`, `after: 16:00`, `weekdays: true`. *** ## `list_connections` List all database connections in the linked organization. **Parameters:** none **Returns:** Array of connection objects with `id`, `name`, `type`. **Tip:** Call this first when creating a check so Claude can pick the right connection. *** ## `list_organizations` List all organizations the authenticated user belongs to. **Parameters:** none **Returns:** Array of organization objects with `id`, `name`, `slug`. **Use case:** Useful if you need Claude to know which organization is currently linked, or to switch context. *** ## `create_organization` Create a new organization. You become the owner. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `name` | string | ✓ | Human-readable organization name | | `slug` | string | | URL-safe slug; auto-generated from the name when omitted | **Returns:** The new organization, including its `id`. On the **local** server this also switches your linked organization to the new one (like `alertee org create`). On the **remote** server, pass the returned `id` as `organization_id` to `create_connection` / `create_check` to provision into it. **Example prompt:** > "Create an Alertee organization called Acme, then add my Postgres connection and a check for it." *** ## `create_connection` Create a database connection. The `connection_string` is encrypted server-side and **tested before saving** — a bad URI or unreachable host returns an error. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `name` | string | ✓ | Human-readable connection name | | `type` | string | ✓ | `postgres` or `clickhouse` | | `connection_string` | string | ✓ | Connection URI, e.g. `postgres://user:pass@host:5432/db` | | `organization_id` | string | | Target organization. Defaults to your default organization | **Returns:** The created connection (use its `id` with `create_check`). *** ## `update_connection` Update an existing connection — **rotate its credentials** (pass a new `connection_string`) or rename it. Re-tested before saving. Only the fields you pass change. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `connection_id` | string | ✓ | ID of the connection to update | | `connection_string` | string | ✓ | New connection URI (the API never returns the old one, so it must be supplied) | | `name` | string | | New name | | `type` | string | | `postgres` or `clickhouse` | | `organization_id` | string | | Target organization | **Example prompt:** > "I rotated the Postgres password — update the 'Acme prod' connection." *** ## `test_connection` Test an existing database connection. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Connection ID | | `organization_id` | string | | Target organization. Defaults to your default organization | **Returns:** `{ success, permissions, warning }` (or `{ success: false, error }`). *** ## `preview_api_metric` Probe a JSON API endpoint while authoring an `api_metric` check — **without saving anything**. Returns the response and the discoverable gjson paths (e.g. `data.0.value`) so you can pick a `value_path` instead of curling first. Supports `query_params` (auto-encoded) and `headers`, so you can preview an HTTP-SQL endpoint like Tinybird. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `url` | string | ✓ | The JSON API endpoint to fetch (http/https) | | `http_method` | string | | HTTP method (default GET) | | `headers` | object | | Request headers, e.g. `{"Authorization": "Bearer "}` | | `query_params` | object | | URL query params, URL-encoded for you, e.g. `{"q": "SELECT count() AS value FROM events"}` | | `request_body` | string | | Optional request body (POST/PUT/PATCH) | | `value_path` | string | | Optional gjson path to confirm what value it extracts | | `organization_id` | string | | Target organization. Defaults to your default organization | **Returns:** `{ status_code, response_time_ms, valid_json, paths: [{ path, sample }], extracted? }`. *** ## `list_alert_groups` List alert groups in the organization. A group routes a check's alerts to its recipients. **Parameters:** none **Returns:** Array of alert group objects. *** ## `create_alert_group` Create an alert group (a container for recipients). Add recipients with `add_alert_recipient`; route a check to it via `create_check`'s `alert_group_id`. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `name` | string | ✓ | Alert group name | | `description` | string | | Optional description | | `is_default` | boolean | | Make this the org default group (used by checks with no group set) | **Returns:** The created alert group, including its `ID`. *** ## `update_alert_group` Rename an alert group, change its description, or make it the org default. Only the fields you pass change. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Alert group ID | | `name` | string | | New name | | `description` | string | | New description | | `is_default` | boolean | | Make this the org default group | *** ## `delete_alert_group` Delete an alert group by ID. Checks using it fall back to the default group. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Alert group ID | *** ## `send_test_alert` Send a clearly-labelled **test** alert through an alert group's real channels (email, Slack, webhook) to verify delivery. It does **not** touch any check or its condition and creates **no incident** — use it to confirm "will I actually get paged?" without forcing a check to fail. Omit `alert_group_id` to use the org's default group. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `alert_group_id` | string | | Alert group to test. Omit to use the org default group | | `check_name` | string | | Optional label shown in the test alert (e.g. a check name) | | `alert_level` | string | | `info` (default), `warning`, or `critical` | **Returns:** `{ success, message }` — the message names how many channels it reached. > [!TIP] > > This is the right way to test delivery. You don't need to break a check and revert it. *** ## `list_alert_recipients` List the recipients (channels) in an alert group. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `alert_group_id` | string | ✓ | Alert group ID | **Returns:** Array of channel objects (`id`, `channel_type`, `config`, `email_group_id`, …). *** ## `add_alert_recipient` Add a recipient to an alert group. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `alert_group_id` | string | ✓ | Alert group ID | | `type` | string | ✓ | `webhook` or `email_group` | | `url` | string | † | Webhook URL (required when `type` is `webhook`) | | `email_group_id` | string | † | Email group ID (required when `type` is `email_group` — create one with `create_email_group`) | † Provide `url` for webhooks, or `email_group_id` for email groups. Slack is configured in the web UI (it needs a connected Slack workspace). **Example prompt:** > "Create a 'Acme oncall' alert group and POST its alerts to [https://hooks.example.com/abc](https://hooks.example.com/abc)." *** ## `remove_alert_recipient` Remove a recipient from an alert group by its channel ID (from `list_alert_recipients`). **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `channel_id` | string | ✓ | Channel ID | *** ## `list_email_groups` List email groups (reusable recipient lists) in the organization. **Parameters:** none **Returns:** Array of email group objects (`id`, `name`, `member_count`, …). *** ## `create_email_group` Create an email group (a reusable list of email recipients), optionally with initial members. Attach it to an alert group with `add_alert_recipient` (type `email_group`). **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `name` | string | ✓ | Email group name | | `description` | string | | Optional description | | `members` | string\[] | | Initial member email addresses | **Returns:** The created email group, including its `id`. *** ## `update_email_group` Rename an email group, change its description, or toggle auto-adding org members. Only the fields you pass change. (Manage member addresses with `add_email_group_members` / `remove_email_group_member`.) **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Email group ID | | `name` | string | | New name | | `description` | string | | New description | | `auto_add_members` | boolean | | Automatically keep org members in this group | *** ## `delete_email_group` Delete an email group by ID. Alert groups using it lose those recipients. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Email group ID | *** ## `add_email_group_members` Add one or more email addresses to an email group. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Email group ID | | `emails` | string\[] | ✓ | Email addresses to add | *** ## `remove_email_group_member` Remove an email address from an email group. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Email group ID | | `email` | string | ✓ | Email address to remove | *** ## `list_inbox` List inbox items (incidents) in the organization. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `status` | string\[] | | Filter by status, e.g. `["open"]`, `["acknowledged"]`, `["resolved"]` | | `severity` | string\[] | | Filter by severity, e.g. `["critical","warning"]` | | `check_id` | string | | Filter to one check's incidents — its full history, including resolved ones when `status` allows | | `limit` | number | | Max items to fetch (default 50) | **Returns:** Array of incident objects (`id`, `title`, `status`, `severity`, `startedAt`, …). `check_id` + `status: ["resolved"]` is how an agent mines a check's past incidents: list them, then `get_inbox_item` each one to read the comments and see how it was fixed before. **Example prompt:** > "What's open and critical in my Alertee inbox right now?" > "This check is failing again — look at its past incidents and how we resolved them." *** ## `get_inbox_item` Get a single incident with its timeline and comments. Comments carry resolution context from past handling (what was wrong, how it was fixed) — read them before diagnosing a recurring incident. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Inbox item (incident) ID | **Returns:** `{ issue, timelineEvents, comments }`. *** ## `comment_on_inbox_item` Add a comment to an incident. Use it to record diagnosis and resolution context (the root cause, the fix that was applied) so the team — and future agents — can see it when the incident recurs. By default the comment is emailed to the email channels of the check's alert group. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Inbox item ID | | `comment` | string | ✓ | The comment text | | `notify` | boolean | | Email the comment to the check's alert subscribers (default `true`) | **Returns:** The created comment plus an `emailed` flag confirming whether it went to the alert group. **Example prompt:** > "Resolve that incident and leave a comment explaining the orders table was stale because the ETL cron was paused." *** ## `edit_inbox_comment` Edit one of your own comments — to correct or refine a recorded diagnosis instead of appending another comment. You can only edit comments you authored; editing does not re-send the email. Get the `comment_id` from `get_inbox_item`'s comments. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Inbox item ID | | `comment_id` | string | ✓ | ID of the comment to edit | | `comment` | string | ✓ | The new comment text | **Returns:** The updated comment. *** ## `delete_inbox_comment` Delete one of your own comments. You can only delete comments you authored. Get the `comment_id` from `get_inbox_item`'s comments. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Inbox item ID | | `comment_id` | string | ✓ | ID of the comment to delete | **Returns:** `{ success: true }`. *** ## `acknowledge_inbox_item` Acknowledge an incident. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Inbox item ID | | `note` | string | | Optional note | *** ## `resolve_inbox_item` Resolve an incident. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Inbox item ID | | `note` | string | | Optional note | | `outcome` | string | | Optional resolution category — one of `resolved_fix`, `resolved_transient`, `ignored`, `suppressed`, `expected`, `duplicate`, `check_changed` | *** ## `get_inbox_digest` Get the inbox digest — a briefing plus active/critical/resolved incident counts. **Parameters:** none **Returns:** `{ briefing, activeIncidentCount, criticalCount, updated24h, resolved24h, pendingImprovements }`. *** ## `list_webhook_receivers` List inbound webhook receivers in the organization. **Parameters:** none **Returns:** Array of receiver objects (`id`, `name`, `severity`, `enabled`, …). *** ## `create_webhook_receiver` Create an inbound webhook receiver. External tools POST to the returned URL to open inbox incidents. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `name` | string | ✓ | Receiver name | | `severity` | string | | `info`, `warning` (default), `error`, or `critical` | | `title_template` | string | | Template for the incident title | | `description_template` | string | | Template for the incident description | | `alert_group_ids` | string\[] | | Alert group IDs to notify when this receiver fires | | `auto_resolve_on_recovery` | boolean | | Auto-resolve the incident when a recovery signal arrives | **Returns:** `{ receiver, webhookUrl }` — POST a JSON body like `{"title":"…","severity":"critical","dedup_key":"…"}` to `webhookUrl`. *** ## `delete_webhook_receiver` Delete an inbound webhook receiver by ID. **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `id` | string | ✓ | Webhook receiver ID | # Health check Source: https://docs.alertee.io/monitoring/health Public liveness endpoint for the Alertee monitoring engine, for external uptime monitors. Alertee runs your checks on a cron engine. If that engine stalls, no checks run and no alerts fire — so it is the critical path. The `/health` endpoint exposes the engine's liveness so you can watch it from an external uptime monitor (UptimeRobot, Better Stack, Pingdom, etc.). ## Endpoint ``` GET https://prod-neon-alertee-gru2.encr.app/health ``` No authentication. It returns only timestamps and counts — no customer data. * **200 OK** — the every-minute cron completed a run within `max_age_seconds`. * **503 Service Unavailable** — the cron has not completed a run in time (engine stalled, slow, or never started). The JSON body is still returned. The status code is what your uptime monitor should alert on. ### Tuning the threshold The default staleness threshold is **180 seconds** (the engine ticks every 60s, so this tolerates a couple of missed/slow ticks). Override it per monitor: ``` GET /health?max_age_seconds=120 ``` ## Response ```json theme={null} { "status": "ok", "now": "2026-06-02T12:00:05Z", "max_age_seconds": 180, "crons": [ { "job": "run-checks-team", "last_run_at": "2026-06-02T12:00:00Z", "seconds_ago": 5, "last_duration_ms": 1820, "last_due_count": 12, "stale": false } ] } ``` `status` is driven by the `run-checks-team` cron (the every-minute job — the tightest heartbeat). The slower `run-checks-starter` and `run-checks-free` jobs appear in `crons` for diagnostics but do not change the overall status. When `status` is `down`, a `message` field explains why. ## Wiring up UptimeRobot 1. Add monitor → **HTTP(s)**. 2. URL: `https://prod-neon-alertee-gru2.encr.app/health` 3. Monitoring interval: 1 minute. 4. Alert on a non-2xx status code (the 503 is your signal). # Organizations & roles Source: https://docs.alertee.io/organizations/overview Invite teammates, manage members, and control who can do what. Everything in Alertee — connections, checks, alert groups, the Inbox — belongs to an **organization**. You can belong to more than one, and switch between them from the organization switcher. ## Inviting teammates Go to **Settings → Team → Invite member**. Enter their email and pick a role. They get an email with a link to join; the invitation expires after 7 days. If it lapses, choose **Resend invitation** from the pending invite's **…** menu. You can change a member's role or remove them from the same **…** menu in Settings → Team. > [!NOTE] > > The invitation link is tied to the address you invited. When the invitee creates > their account, the email is locked to that address, so they can't accidentally > sign up under a different one. (Casing and surrounding spaces are ignored.) If > someone signs in with the wrong account, the accept screen offers to sign out and > retry with the right email. ## Requesting access If someone lands on your workspace without an invite, they see a **Request access** screen instead of a dead end. They enter their email (and an optional message), and your organization's Owners and Admins get an email notification. Pending requests show up under **Settings → Team → Access requests**, where an Admin or Owner can **Approve** (which sends a normal invitation for the chosen role) or **Deny**. The section only appears when there's something waiting. Signed-in users who aren't members of a workspace can request access too, using the email they're signed in with. ## Roles | Role | Can do | | - | - | | **Owner** | Everything, including billing, deleting the organization, and managing all members (including other owners). | | **Admin** | Manage team members, connections, checks, and settings. Can invite Members and Admins, but not assign Owner. | | **Member** | Create, edit, and run checks and connections. Can't manage the team or billing. | A few guardrails: an organization always keeps at least one Owner (you can't remove or demote the last one), and only an Owner can promote someone to Owner. > [!NOTE] > > Invitations are sent as **Member** or **Admin**. Owner is granted by an existing > Owner promoting a member. ## Creating an organization Create one from the organization switcher (**Create organization**), or from the CLI / an AI agent: ```bash theme={null} alertee org create "Acme" ``` The creator becomes the Owner. See the [CLI reference](/cli/commands) and [MCP tools](/mcp/tools) (`create_organization`) for the full surface. ## Leaving an organization Any member can remove themselves under **Settings → Organization → Leave organization** — you don't need an admin to do it for you. You lose access immediately and can be re-invited later. If you're the **only Owner**, you can't leave an organization with no one in charge. The leave dialog asks you to pick another member to take over as Owner; it promotes them and removes you in one step. If you're also the only member, delete the organization instead of leaving it. # Quickstart Source: https://docs.alertee.io/quickstart Create your first check in under five minutes. ## 1. Create an account Sign up at [app.alertee.app](https://app.alertee.app). The free plan includes 5 checks — no credit card required. ## 2. Choose what to monitor On your first visit, Alertee asks what you want to monitor: a **database**, a **website / API**, an **API metric**, a **heartbeat / job**, or a **pushed number** (your own cron sends us the value). Only database checks need a connection — the other types skip straight to creating the check. For a database check, paste a read-only connection string (PostgreSQL or ClickHouse). Alertee detects the database type from it and names the connection after the database and host (for example, `orders @ db.example.com`); rename it if you like. If the test fails, the message says why, such as a wrong password or an unreachable host. You can also add connections later under **Settings → Connections**. > [!TIP] > > Alertee only needs `SELECT` privileges. Create a dedicated read-only user for monitoring. > [!NOTE] > > **Not ready to connect a database?** Every account can browse the **Demo Organization** — pick it from the organization switcher (or the *Explore the live demo* link during onboarding). It's a fully populated read-only workspace with live-looking checks, grid heatmaps, and open incidents, so you can see what Alertee does before handing it any credentials. ## 3. Create a check You can let Alertee draft checks for you, or write one by hand. ### Option A — let Alertee suggest checks After connecting a database, describe what you want to watch in plain English and Alertee's agent drafts baseline-aware SQL checks from your schema. Review the generated SQL, tweak anything, and enable the ones you want. These stay [managed by Alertee](/checks/managed) and get re-tuned over time — or take any of them back to edit by hand. ### Option B — write it yourself Click **Add check** on the Checks page, pick **Database check**, and: 1. Choose a connection (picked for you if you only have one) 2. Write a SQL query that returns a single number, then **Test query**. The result says whether the check would alert right now. 3. Set **Healthy when** to describe the **healthy** result (e.g. "greater than 0" — alerts when the count hits zero) 4. Give the check a name (Alertee suggests one) and choose how often it runs Everything else is optional and sits behind **More options** (checking each row, escalation thresholds, replaying history) and **Advanced** (alert tuning). If your query returns one row per group with `name` and `value` columns, the form offers to [check each row](/checks/conditions#checking-each-row) separately. ## 4. Set up alerts Go to **Settings → Alerts** and create an alert group with your preferred channels. Assign it to your check. When a check fails, Alertee opens an incident in your [Inbox](/inbox/overview) and notifies your alert group via email, Slack, or webhook. *** ## Using the CLI If you prefer working from a terminal or want to create checks from within an AI coding session, use the [Alertee CLI](/cli/installation). ```bash theme={null} npx @alertee/cli login npx @alertee/cli link npx @alertee/cli checks create ``` Or use the [MCP server](/mcp/overview) to let agents like Claude Code create checks for you.