Overview
A channel is where alerts go: email through one of your email services, a webhook, Slack, Discord or Telegram.
When to use it
- Alerts to the team chat.
- Email to whoever is on call.
- Alerts into another system.
How it works
- Outbox
- Notifications are stored first and sent every 2 seconds, so none is lost if something restarts.
- Retries
- A failed delivery is tried again after 15 s, 30 s, 1, 2 and 4 minutes.
Each delivery is recorded on the channel; the last 100 are kept so you can see what was sent and whether it arrived. Webhooks can be signed with HMAC-SHA256.
Architecture
- Alert to Outbox
- Outbox to Notifier
- Notifier to Email, chat or webhook: deliver
Flows
A delivery
- An alert fires and writes a notification.
- The notifier sends it.
- If it fails, it is retried for about five minutes.
Set it up
In the console
- For chat apps, store the webhook URL or bot token as a secret.
- Open Channels and choose New channel.
- Use Test.
With the CLI
enclave channel create ops --webhook https://hooks.example.com/enclave --waitWith OpenTofu
OpenTofu configuration
resource "enclave_channel" "ops" {
name = "ops"
type = "webhook"
webhook = { url = "https://hooks.example.com/enclave" }
}Settings reference
Every setting and output of the OpenTofu resource; the console and the CLI use the same names in their own words. Generated from platform 4d30582.
| Name | Type | Use | What it does |
|---|---|---|---|
name | text | required | Name of the channel: 3–40 lowercase letters, digits or hyphens, starting with a letter. Changing it replaces the channel. |
type | text | required | email, webhook, slack, discord or telegram. Changing it replaces the channel. |
chat_id | text | optional | telegram: the chat ID. |
email | list of objects | optional | email: the service, sender and recipients. |
project | text | optional | The project to create it in. Defaults to the provider's project (ENCLAVE_PROJECT, else default). Changing it replaces the resource. |
secret | text | optional | slack, discord: the secret holding the webhook URL; telegram: the secret holding the bot token. |
webhook | list of objects | optional | webhook: where JSON is posted. |
id | text | output | Resource ID. |
Limits and security
Good to know
- The last 100 deliveries per channel are kept.
Security
- Chat tokens and webhook URLs are kept as secrets.