Alert Rules
Alert rules let you define conditions on endpoint executions that trigger notifications via Slack, email, or webhook. No external automation tools needed.
Creating an alert rule
Section titled “Creating an alert rule”Go to Alerts in the dashboard sidebar and click + Add Rule.
Each rule has:
| Field | Description |
|---|---|
| Name | A descriptive label (e.g. “Deploy failure alert”) |
| Endpoint | A specific endpoint, or “All endpoints” for a wildcard rule |
| Condition | When the alert fires (see below) |
| Channel | How to deliver the notification |
| Destination | Where to send it (URL, email address, etc.) |
Conditions
Section titled “Conditions”| Condition | Fires when |
|---|---|
failure | Exit code is not 0 |
success | Exit code is 0 |
always | Every execution completes |
consecutive_failures | N failures in a row (configurable threshold) |
Consecutive failures
Section titled “Consecutive failures”When using consecutive_failures, set the threshold to the number of consecutive non-zero exit codes required. For example, a threshold of 3 fires after the 3rd failure in a row. A single success resets the counter.
Channels
Section titled “Channels”Webhook
Section titled “Webhook”Posts a JSON payload to the destination URL:
{ "alert_rule": "Deploy failure alert", "endpoint": "deploy", "exit_code": 1, "status": "failure", "duration_ms": 4523, "execution_id": "abc-123", "timestamp": "2025-01-15T10:30:00Z"}Headers include X-Wrapd-Event: alert.fired and Content-Type: application/json.
Provide a Slack incoming webhook URL as the destination. The alert sends a formatted message with the endpoint name, status, and exit code.
Provide an email address as the destination. Wrapd sends an HTML email with the alert details. Email alerts require the Resend integration to be configured on the server.
Wildcard rules
Section titled “Wildcard rules”Leave the endpoint selector on “All endpoints” to create a rule that fires for any endpoint owned by your account. This is useful for catch-all failure notifications.
Enabling and disabling
Section titled “Enabling and disabling”Each rule has a toggle to enable or disable it without deleting. Disabled rules are never evaluated.
Tier limits
Section titled “Tier limits”| Free | Pro | Team | |
|---|---|---|---|
| Alert rules | 3 | 20 | 100 |
Example: page on consecutive failures
Section titled “Example: page on consecutive failures”- Create a rule named “Critical backup alert”
- Set endpoint to
db-backup - Set condition to Consecutive failures with threshold 3
- Set channel to Slack and paste your Slack webhook URL
- Save — you’ll be notified after 3 consecutive backup failures