Skip to content

Alert Rules

Alert rules let you define conditions on endpoint executions that trigger notifications via Slack, email, or webhook. No external automation tools needed.

Go to Alerts in the dashboard sidebar and click + Add Rule.

Each rule has:

FieldDescription
NameA descriptive label (e.g. “Deploy failure alert”)
EndpointA specific endpoint, or “All endpoints” for a wildcard rule
ConditionWhen the alert fires (see below)
ChannelHow to deliver the notification
DestinationWhere to send it (URL, email address, etc.)
ConditionFires when
failureExit code is not 0
successExit code is 0
alwaysEvery execution completes
consecutive_failuresN failures in a row (configurable threshold)

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.

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.

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.

Each rule has a toggle to enable or disable it without deleting. Disabled rules are never evaluated.

FreeProTeam
Alert rules320100
  1. Create a rule named “Critical backup alert”
  2. Set endpoint to db-backup
  3. Set condition to Consecutive failures with threshold 3
  4. Set channel to Slack and paste your Slack webhook URL
  5. Save — you’ll be notified after 3 consecutive backup failures