Set up notifications
Notifications send Orchard events, such as a failed deploy or a crashing database, to the places your team already reads. You set them up in two parts: a destination sets where a message goes, and a rule sets which events reach that destination. Because the two are separate, one destination can serve several rules.
Prerequisites
Section titled “Prerequisites”- The Owner or Admin role in the organization, to manage organization destinations.
- On an instance that uses PostHog, the Notifications beta turned on for your account. Go to Account settings > Early access.
Add a destination
Section titled “Add a destination”- Go to Organization settings > Notifications.
- Select Add destination.
- In Send to, select Discord, Slack, Webhook, or Email.
- In Name, enter a name, such as
#deploys. - Enter the Webhook URL, or for email, the Recipients. Recipients must be members of the organization.
- Select Add destination.
- For a webhook, copy the signing secret. Orchard does not show it again.
To check the destination, select Send a test notification on its row.
orchard notify channel create --type slack --name deploys \ --url https://hooks.slack.com/services/... \ --events deploy.failed,pod.crashingTo send a test message, run orchard notify channel test <id>.
Orchard validates webhook URLs before it saves them. It rejects internal addresses.
Add a rule
Section titled “Add a rule”- Go to Organization settings > Notifications.
- In Rules, select Add rule.
- In Channel, select a destination.
- Select the events to send.
- Select Add rule.
Orchard recommends that you start with failure events, such as deploy.failed, pod.crashing, and backup.failed.
Scope a rule to an app
Section titled “Scope a rule to an app”To route an app’s events somewhere else, add a channel on the app. You can also mute an inherited organization rule for that app.
- Open the app.
- Go to Settings > Notifications.
- In Team channels, select Add channel.
- Enter the channel details.
- Select the events.
To mute a rule, select Mute here on its row.
Events
Section titled “Events”| Category | Events |
|---|---|
| Deploys | deploy.succeeded, deploy.failed, deploy.regressed |
| App and database health | pod.crashing, pod.recovered, alert.firing, alert.resolved, db.crashing, db.recovered, db.storage_pressure, db.storage_recovered, db.read_only, db.writes_resumed, db.memory_raised |
| Backups and archiving | backup.completed, backup.failed, db.archiving_failing, db.archiving_recovered, db.restore_test_failed |
| Jobs | job.succeeded, job.failed |
| Security | security.signed_in, security.app_authorized |
Personal notifications
Section titled “Personal notifications”Your own notifications are separate from organization rules. To choose which categories reach you, go to Account settings > Notifications.
Review deliveries
Section titled “Review deliveries”Orchard records each delivery attempt and its outcome. The status appears on the destination’s row. To list deliveries from the CLI, run orchard notify deliveries <channelId>.
To resend events after you fix a destination, open the destination’s menu and select Replay the last 24 hours.
Related resources
Section titled “Related resources”- Create alert rules - Fire
alert.firingandalert.resolvedevents when an app metric crosses a threshold. - Monitor an app - Read metrics, logs, requests, errors, and deploy results on the Observe tab of an app.
orchard notifyreference - Everyorchard notifycommand and flag.