From f8e69e7480563508dddf41b206d94dc22f1a1019 Mon Sep 17 00:00:00 2001 From: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Date: Wed, 12 Feb 2025 22:00:40 +0000 Subject: [PATCH 1/5] init inbox docs --- docs/images/icons/inbox-in.svg | 6 ++++++ docs/manifest.json | 6 ++++++ docs/user-guides/inbox/index.md | 1 + 3 files changed, 13 insertions(+) create mode 100644 docs/images/icons/inbox-in.svg create mode 100644 docs/user-guides/inbox/index.md diff --git a/docs/images/icons/inbox-in.svg b/docs/images/icons/inbox-in.svg new file mode 100644 index 0000000000000..218c6fe25825b --- /dev/null +++ b/docs/images/icons/inbox-in.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/manifest.json b/docs/manifest.json index 3b49c2321ccef..2ed012001aee0 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -164,6 +164,12 @@ "path": "./user-guides/workspace-management.md", "icon_path": "./images/icons/generic.svg" }, + { + "title": "Workspace Notifications", + "description": "Manage workspace notifications", + "path": "./user-guides/inbox/index.md", + "icon_path": "./images/icons/inbox-in.svg" + }, { "title": "Workspace Scheduling", "description": "Cost control with workspace schedules", diff --git a/docs/user-guides/inbox/index.md b/docs/user-guides/inbox/index.md new file mode 100644 index 0000000000000..393273020c2a0 --- /dev/null +++ b/docs/user-guides/inbox/index.md @@ -0,0 +1 @@ +# Workspace notifications From bb1f59372f7fd0c90c403b2ad9b285c5dcb65e72 Mon Sep 17 00:00:00 2001 From: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Date: Wed, 12 Feb 2025 22:03:46 +0000 Subject: [PATCH 2/5] update (placeholder) icon --- docs/images/icons/inbox-in.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/images/icons/inbox-in.svg b/docs/images/icons/inbox-in.svg index 218c6fe25825b..aee03ba870f95 100644 --- a/docs/images/icons/inbox-in.svg +++ b/docs/images/icons/inbox-in.svg @@ -2,5 +2,5 @@ - + \ No newline at end of file From cf5720804f72f01ce82c395f1ef8e4289682605a Mon Sep 17 00:00:00 2001 From: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Date: Tue, 1 Apr 2025 18:33:28 +0000 Subject: [PATCH 3/5] update/reorg notifications --- docs/admin/monitoring/notifications/index.md | 68 ++++++++++---------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/docs/admin/monitoring/notifications/index.md b/docs/admin/monitoring/notifications/index.md index ae5d9fc89a274..afe31fe4c4fc2 100644 --- a/docs/admin/monitoring/notifications/index.md +++ b/docs/admin/monitoring/notifications/index.md @@ -14,27 +14,24 @@ user(s) of the event. Coder supports the following list of events: -### Workspace Events +### Template Events -These notifications are sent to the workspace owner: +These notifications are sent to users with **template admin** roles: -- Workspace created -- Workspace deleted -- Workspace manual build failure -- Workspace automatic build failure -- Workspace manually updated -- Workspace automatically updated -- Workspace marked as dormant -- Workspace marked for deletion +- Report: Workspace builds failed for template + - This notification is delivered as part of a weekly cron job and summarizes + the failed builds for a given template. +- Template deleted +- Template deprecated ### User Events These notifications are sent to users with **owner** and **user admin** roles: +- User account activated - User account created - User account deleted - User account suspended -- User account activated These notifications are sent to users themselves: @@ -42,22 +39,39 @@ These notifications are sent to users themselves: - User account activated - User password reset (One-time passcode) -### Template Events +### Workspace Events -These notifications are sent to users with **template admin** roles: +These notifications are sent to the workspace owner: -- Template deleted -- Template deprecated +- Workspace automatic build failure +- Workspace created +- Workspace deleted +- Workspace manual build failure +- Workspace manually updated +- Workspace marked as dormant +- Workspace marked for deletion - Out of memory (OOM) / Out of disk (OOD) - - [Configure](#configure-oomood-notifications) in the template `main.tf`. -- Report: Workspace builds failed for template - - This notification is delivered as part of a weekly cron job and summarizes - the failed builds for a given template. + - Template admins can [configure OOM/OOD](#configure-oomood-notifications) notifications in the template `main.tf`. +- Workspace automatically updated + +## Delivery Methods + +Notifications can be delivered in the Coder dashboard and by SMTP or webhook. +OOM/OOD notifications can be delivered to users in VS Code. + +You can choose SMTP or webhook globally with +[`CODER_NOTIFICATIONS_METHOD`](../../../reference/cli/server.md#--notifications-method) +(default: `smtp`). +When there are no delivery methods configured, notifications are disabled. + +Premium customers can configure which method to use for each of the supported +[Events](#workspace-events). +See the [Preferences](#delivery-preferences) section for more details. ## Configuration -You can modify the notification delivery behavior using the following server -flags. +You can modify the notification delivery behavior in your Coder deployment's +`https://coder.example.com/deployment/notifications`, or with the following server flags: | Required | CLI | Env | Type | Description | Default | |:--------:|-------------------------------------|-----------------------------------------|------------|-----------------------------------------------------------------------------------------------------------------------|---------| @@ -75,18 +89,6 @@ This can help prevent agent disconnects due to OOM/OOD issues. To enable OOM/OOD notifications on a template, follow the steps in the [resource monitoring guide](../../templates/extending-templates/resource-monitoring.md). -## Delivery Methods - -Notifications can currently be delivered by either SMTP or webhook. Each message -can only be delivered to one method, and this method is configured globally with -[`CODER_NOTIFICATIONS_METHOD`](../../../reference/cli/server.md#--notifications-method) -(default: `smtp`). When there are no delivery methods configured, notifications -will be disabled. - -Premium customers can configure which method to use for each of the supported -[Events](#workspace-events); see the [Preferences](#delivery-preferences) -section below for more details. - ## SMTP (Email) Use the `smtp` method to deliver notifications by email to your users. Coder From ce8e23798a242d266758802e608d12d9ed73f1f1 Mon Sep 17 00:00:00 2001 From: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Date: Tue, 1 Apr 2025 18:35:41 +0000 Subject: [PATCH 4/5] use /settings/notifications --- docs/admin/monitoring/notifications/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/monitoring/notifications/index.md b/docs/admin/monitoring/notifications/index.md index afe31fe4c4fc2..138c92820f21a 100644 --- a/docs/admin/monitoring/notifications/index.md +++ b/docs/admin/monitoring/notifications/index.md @@ -71,7 +71,7 @@ See the [Preferences](#delivery-preferences) section for more details. ## Configuration You can modify the notification delivery behavior in your Coder deployment's -`https://coder.example.com/deployment/notifications`, or with the following server flags: +`https://coder.example.com/settings/notifications`, or with the following server flags: | Required | CLI | Env | Type | Description | Default | |:--------:|-------------------------------------|-----------------------------------------|------------|-----------------------------------------------------------------------------------------------------------------------|---------| From e559d257942563350c20c17919d1e441ccc2aff9 Mon Sep 17 00:00:00 2001 From: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Date: Tue, 1 Apr 2025 18:56:08 +0000 Subject: [PATCH 5/5] add coder_notifications_inbox_enabled --- docs/admin/monitoring/notifications/index.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/admin/monitoring/notifications/index.md b/docs/admin/monitoring/notifications/index.md index 138c92820f21a..9019442746f7f 100644 --- a/docs/admin/monitoring/notifications/index.md +++ b/docs/admin/monitoring/notifications/index.md @@ -56,13 +56,17 @@ These notifications are sent to the workspace owner: ## Delivery Methods -Notifications can be delivered in the Coder dashboard and by SMTP or webhook. +Notifications can be delivered through the Coder dashboard Inbox and by SMTP or webhook. OOM/OOD notifications can be delivered to users in VS Code. -You can choose SMTP or webhook globally with +You can configure: + +- SMTP or webhooks globally with [`CODER_NOTIFICATIONS_METHOD`](../../../reference/cli/server.md#--notifications-method) (default: `smtp`). -When there are no delivery methods configured, notifications are disabled. +- Coder dashboard Inbox with +[`CODER_NOTIFICATIONS_INBOX_ENABLED`](../../../reference/cli/server.md#--notifications-inbox-enabled) +(default: `true`). Premium customers can configure which method to use for each of the supported [Events](#workspace-events). @@ -78,6 +82,7 @@ You can modify the notification delivery behavior in your Coder deployment's | ✔️ | `--notifications-dispatch-timeout` | `CODER_NOTIFICATIONS_DISPATCH_TIMEOUT` | `duration` | How long to wait while a notification is being sent before giving up. | 1m | | ✔️ | `--notifications-method` | `CODER_NOTIFICATIONS_METHOD` | `string` | Which delivery method to use (available options: 'smtp', 'webhook'). See [Delivery Methods](#delivery-methods) below. | smtp | | -️ | `--notifications-max-send-attempts` | `CODER_NOTIFICATIONS_MAX_SEND_ATTEMPTS` | `int` | The upper limit of attempts to send a notification. | 5 | +| -️ | `--notifications-inbox-enabled` | `CODER_NOTIFICATIONS_INBOX_ENABLED` | `bool` | Enable or disable inbox notifications in the Coder dashboard. | true | ### Configure OOM/OOD notifications