# Alert Channels

Source: https://docs.ops0.com/docs/settings/integrations/alerts

Configure where ops0 sends operational alerts — deployment completions, policy violations, approval requests, security findings, and drift detection results. ops0 supports **Slack** incoming webhooks and **generic HTTP webhooks** for any endpoint that accepts JSON.

---

## Slack

### Prerequisites

- A Slack workspace you administer
- An **Incoming Webhook** URL created in your [Slack App settings](https://api.slack.com/messaging/webhooks)

### Adding a Slack Channel

### Open Alert Channels
Go to **Settings** > **Integrations** > **Alert Channels**.

### Add Channel
Click **Add Channel** and select **Slack**.

### Paste the Webhook URL
Enter the Incoming Webhook URL from your Slack App configuration.

### Name the Channel
Give the channel a descriptive name (e.g. `#ops-alerts` or `Production Deployments`).

### Configure Filters
Choose which severities and event categories this channel should receive.

### Test and Save
Click **Test** to send a sample message to the channel, then click **Save**.

### Slack Message Format

Each alert sent to Slack includes:

- **Severity badge** — color-coded label (e.g. Critical, Info)
- **Event type** — what triggered the alert (e.g. Deployment Completed)
- **Resource or project name** — the affected resource or ops0 project
- **Link back to ops0** — deep link to the relevant page in the ops0 console

---

## Webhook

Any HTTP endpoint that accepts a `POST` request with a JSON body can be used as an alert channel.

### Adding a Webhook Channel

### Open Alert Channels
Go to **Settings** > **Integrations** > **Alert Channels**.

### Add Channel
Click **Add Channel** and select **Webhook**.

### Enter the URL
Provide the full HTTPS URL of your endpoint.

### Add Custom Headers (optional)
Add any headers your endpoint requires — for example `Authorization: Bearer <token>` or `X-API-Key: <key>`. Credentials are encrypted at rest.

### Configure Filters
Choose which severities and event categories this channel should receive.

### Test and Save
Click **Test** to send a sample payload and verify delivery, then click **Save**.

### Payload Format

ops0 sends a JSON payload on every event:

```json
{
  "event": "deployment.completed",
  "severity": "info",
  "organization": "acme-corp",
  "timestamp": "2026-05-28T10:00:00Z",
  "data": {
    "project": "production-vpc",
    "deployment_id": "dep-abc123",
    "status": "completed",
    "resources_added": 3,
    "resources_changed": 1,
    "cost_delta": "+$45.20/mo"
  },
  "link": "https://app.ops0.ai/iac/conv-xyz/deployments/dep-abc123"
}
```

---

## Event Types

| Event | When Sent |
|---|---|
| `deployment.completed` | Terraform apply finishes successfully |
| `deployment.failed` | Plan or apply fails |
| `deployment.awaiting_approval` | Deployment requires human approval |
| `deployment.approved` | An approver approved a deployment |
| `deployment.rejected` | An approver rejected a deployment |
| `policy.blocked` | Deployment blocked by a policy violation |
| `discovery.completed` | Discovery scan finishes |
| `drift.detected` | Drift detected between two discovery sessions |
| `security.finding` | Security scan surfaces a Critical or High finding |

---

## Filtering

Each alert channel can be scoped so it only receives the events you care about.

**By Severity**

| Option | Receives |
|---|---|
| All | Every event regardless of severity |
| Critical + High only | Only high-impact events |

**By Category**

| Option | Receives |
|---|---|
| All | Every event category |
| Deployments only | `deployment.*` events |
| Discovery only | `discovery.*` and `drift.*` events |
| Security only | `security.*` events |

Multiple channels can each receive a different filtered subset. For example, route Critical security findings to a dedicated `#security-alerts` Slack channel while sending all deployment events to a ticketing webhook.

---

## Testing a Channel

Click **Test** on any channel in the list to dispatch a sample payload immediately. The test result shows:

- HTTP response code from your endpoint
- Whether delivery succeeded or failed
- The raw response body (for webhook channels)

Use this to confirm headers, firewall rules, and endpoint logic before relying on the channel for live alerts.

---

## Managing Channels

The Alert Channels list shows all configured channels with the following information:

| Column | Description |
|---|---|
| Name | Friendly name you assigned |
| Type | Slack or Webhook |
| Status | **Active** (delivering) or **Error** (delivery failing) |
| Last Delivery | Timestamp of the most recent successful delivery |

Available actions per channel: **Edit**, **Test**, **Disable**, **Delete**.

**Automatic retry on failure**

If a webhook returns a non-2xx response, ops0 retries the delivery 3 times with exponential backoff. After 3 consecutive failures the channel is marked as **Error** and an in-app notification is shown. Resolve the issue and click **Test** to confirm delivery is restored — the channel status resets automatically on the next successful delivery.

---

## Related

- [Integrations](https://docs.ops0.com/docs/settings/integrations): Overview of all ops0 integrations available in Settings.

- [Discovery Scheduling](https://docs.ops0.com/docs/discovery/scheduling): Schedule recurring discovery scans to keep your inventory current.
