Alerts
Threshold rules on errors, latency, cost, open incidents, failed cron runs and crash-free sessions, delivered by email or webhook, with a firing history.
An alert rule watches one metric over a recent window and notifies you when it crosses a threshold: “more than 20 errors in checkout”, “average latency above 3 seconds”, “the nightly sync failed”, “crash-free sessions dropped”. A rule sends an email or posts JSON to a URL. It never changes your data or messages your users.
Alert rules are one of three ways axonpush pushes things to you:
- Alert rules (this page): a threshold on an aggregate.
- Workspace checks: lifecycle alerts declared in a workspace spec, for example “tickets open for more than a day”. See workspaces.
- Webhook endpoints: every matching event, as it lands. See webhooks.
Create a rule in the dashboard
Open Alerts. Workspace checks are listed first; rules live under Trace thresholds. Select New threshold and fill in:
- Name, Metric, Operator and Threshold.
- The scope fields the metric uses (see the table below), such as Service, Model, Release, Monitor, Workflow stage and Environment. Leave one empty to cover everything.
- Destination type (Email or Webhook) and Destination (an email address or a URL).
- Enabled.
Scope is fixed once the rule is created. You can edit the name, metric, operator, threshold, destination and enabled flag later, but to change scope, create a new rule. The Monitors and Releases pages each have a Create alert button that opens this form prefilled.
Metrics
metric | Value compared to the threshold | Scope fields it reads |
|---|---|---|
error_count | Events with error status in the window | appId, environmentId, service, model, release |
error_rate | Error events as a percentage (0 to 100) of all events in the window | same |
latency_ms | Average event duration in milliseconds | same |
cost_usd | Sum of attributed cost in USD | same |
lifecycle_open | Current number of open lifecycle incidents (not a window count) | appId, environmentId, service as the incident entity type |
monitor_failed | Cron runs that ended error, missed or timeout in the window, on unmuted monitors | appId, environmentId, service as the monitor slug |
crash_free_rate | Crash-free sessions as a percentage (0 to 100) for the window | environmentId, release |
Operators are gt, gte, lt and lte.
For error_count, error_rate, latency_ms and cost_usd, “events” means
every stored event in scope (spans, logs and errors), and a window with no
events is skipped rather than evaluated as zero. Issue triage does not affect
these counts: a muted or ignored issue still counts.
crash_free_rate is skipped while there are no sessions in scope.
environmentId must be the environment’s ID, not its slug. A slug is accepted
but matches nothing, so the rule never fires.
A crash_free_rate threshold is a percentage, the same scale the
Releases page reports: lt 99 fires when fewer than 99% of
sessions were crash-free. Rules saved earlier with a fractional threshold (1 or
less, such as 0.99) were converted to the percentage scale.
How rules are evaluated
- Window. Each evaluation looks back 15 minutes. Self-hosted deployments
can change this with
ALERT_WINDOW_MINUTES. - When. Evaluation is event driven. An organisation’s rules run when new telemetry arrives, when a monitor records a failed, missed or timed-out run, and while lifecycle incidents are open. An organisation sending nothing is not evaluated.
- Cooldown. After a rule fires, it does not fire again for 60 minutes,
however long the metric stays over the threshold. The cooldown counts from
the last recorded firing, whether or not its delivery succeeded. Self-hosted
deployments can change it with
ALERT_COOLDOWN_MINUTES(0turns it off). - No recovery message. A rule notifies when the threshold is crossed. It does not send a “resolved” notification when the metric recovers; if the metric is still over the threshold after the cooldown, you get another notification.
Destinations
The email names the rule, the metric, the observed value against the threshold
and the window, with a link to the relevant dashboard page (Monitors for
monitor_failed). Emails for lifecycle_open also list up to 50 open
incidents with their stage, affected count, first and last occurrence and an
evidence link.
Webhook
A webhook rule sends POST with Content-Type: application/json,
User-Agent: axonpush-alerts, an X-AxonPush-Delivery header carrying the
delivery ID and the signature headers. Any status of 300 or
above counts as a failure.
{
"alertRuleId": "alr_4f1c…",
"name": "Checkout errors",
"orgId": "…",
"metric": "error_count",
"operator": "gt",
"threshold": 20,
"observed": 37,
"window": "last 15 min",
"firedAt": "2026-11-18T09:42:00Z",
"appId": "",
"environment": "env_…",
"stage": "checkout",
"deduplicationKey": "<orgId>:<alertRuleId>",
"evidenceUrl": "https://app.axonpush.xyz/alerts"
}environment is the rule’s environment ID and stage is the rule’s service
value, whatever the metric. monitor_failed payloads add monitorSlug.
lifecycle_open payloads add recoveryCondition and an evidence object with
up to 50 open incidents.
Use deduplicationKey or X-AxonPush-Delivery to drop duplicates.
Webhook signing
Each alert rule has its own signing secret (whsec_...). It is returned once,
as webhookSecret, in the response to POST /v2/alerts, and later reads do not
include it. Deliveries carry the same headers as
webhook endpoints:
| Header | Value |
|---|---|
X-AxonPush-Timestamp | Unix time in seconds when the delivery was signed |
X-AxonPush-Signature-V2 | Hex HMAC-SHA256 of timestamp + "." + body, keyed with the rule’s secret |
X-AxonPush-Signature | Deprecated body-only signature, sent for one more release |
Verify them exactly as for webhook endpoints, using the rule’s secret.
To get a new secret, or to learn the secret of a rule created before alert webhooks were signed, rotate it. The previous secret stops working immediately:
curl -X POST https://api.axonpush.xyz/v2/alerts/$ALERT_RULE_ID/rotate-secret \
-H "X-API-Key: $AXONPUSH_API_KEY"The response is {"webhookSecret": "whsec_..."}. Rotation needs the
alerts:manage scope and is written to the organisation audit log. The SDKs
do not wrap it yet; call it over HTTP or use the MCP tool alerts_rotateSecret.
Delivery is queued and retried. When it is finally sent, axonpush uses the
rule’s destination at that moment. A queued notification is dropped (and its
occurrence marked skipped) if the rule was disabled or deleted, its
destination type changed, or its app or environment was deleted in the
meantime.
Firing history
Every firing is recorded as an occurrence. In the dashboard, select History
on a rule. Through the API, use GET /v2/alerts/{alertRuleId}/occurrences
(limit defaults to 50, maximum 200, newest first).
Each occurrence has occurrenceId, metric, value, threshold, firedAt,
a state and, when delivery failed, a message:
state | Meaning |
|---|---|
queued | Handed to the delivery queue and not finished yet, including while a failing delivery is being retried. |
sent | Delivered |
skipped | Dropped because the rule changed or was removed before delivery |
failed | The notification could not be queued, or every delivery attempt failed. message has the last error. |
Occurrences are kept for 90 days, and deleting a rule deletes its history.
Manage rules with the API
curl -s -X POST https://api.axonpush.xyz/v2/alerts \
-H "X-API-Key: $AXONPUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Checkout errors",
"metric": "error_count",
"operator": "gt",
"threshold": 20,
"service": "checkout",
"environmentId": "'"$PROD_ENV_ID"'",
"destinationType": "webhook",
"destination": "https://ops.example.com/hooks/axonpush-alerts"
}'| Method | Path | |
|---|---|---|
GET | /v2/alerts | List rules |
POST | /v2/alerts | Create. name, metric, operator, threshold, destinationType and destination are required; enabled defaults to true. |
PATCH | /v2/alerts/{alertRuleId} | Change name, metric, operator, threshold, destinationType, destination or enabled. Scope fields are not accepted. |
DELETE | /v2/alerts/{alertRuleId} | Delete the rule and its history |
GET | /v2/alerts/{alertRuleId}/occurrences | Firing history |
POST | /v2/alerts/{alertRuleId}/rotate-secret | Replace the rule’s webhook signing secret and return the new one once |
There is no endpoint to fetch a single rule; list and filter. The Python SDK’s
alerts.create and alerts.update take generated request models with no
stable public name yet, so create rules with curl, TypeScript or the dashboard.
Every alert endpoint, including the reads, needs the alerts:manage scope on
an API key. In the dashboard, any member can view rules, and creating, editing
or deleting them needs the admin role. Rule changes are written to the
organisation audit log.
Related
- Errors and issues
- Cron monitors
- Releases
- Webhooks
- Workspaces: workspace checks and lifecycle incidents
- MCP tools:
alerts_list,alerts_create,alerts_update,alerts_delete,alerts_occurrences,alerts_rotateSecret - API: list, create, update, delete, occurrences, rotate secret