chore: add workspace oom/ood notification templates (#16250)

This commit is contained in:
Danielle Maywood
2025-02-04 19:25:18 +00:00
committed by GitHub
parent 7cbd77fd94
commit dbad69dbd9
10 changed files with 457 additions and 0 deletions
@@ -0,0 +1,34 @@
{
"_version": "1.1",
"msg_id": "00000000-0000-0000-0000-000000000000",
"payload": {
"_version": "1.1",
"notification_name": "Workspace Out Of Disk",
"notification_template_id": "00000000-0000-0000-0000-000000000000",
"user_id": "00000000-0000-0000-0000-000000000000",
"user_email": "bobby@coder.com",
"user_name": "Bobby",
"user_username": "bobby",
"actions": [
{
"label": "View workspace",
"url": "http://test.com/@bobby/bobby-workspace"
}
],
"labels": {
"workspace": "bobby-workspace"
},
"data": {
"volumes": [
{
"path": "/home/coder",
"threshold": "90%"
}
]
}
},
"title": "Your workspace \"bobby-workspace\" is low on volume space",
"title_markdown": "Your workspace \"bobby-workspace\" is low on volume space",
"body": "Hi Bobby,\n\nVolume /home/coder is over 90% full in workspace bobby-workspace.",
"body_markdown": "Hi Bobby,\n\nVolume **`/home/coder`** is over 90% full in workspace **bobby-workspace**."
}
@@ -0,0 +1,42 @@
{
"_version": "1.1",
"msg_id": "00000000-0000-0000-0000-000000000000",
"payload": {
"_version": "1.1",
"notification_name": "Workspace Out Of Disk",
"notification_template_id": "00000000-0000-0000-0000-000000000000",
"user_id": "00000000-0000-0000-0000-000000000000",
"user_email": "bobby@coder.com",
"user_name": "Bobby",
"user_username": "bobby",
"actions": [
{
"label": "View workspace",
"url": "http://test.com/@bobby/bobby-workspace"
}
],
"labels": {
"workspace": "bobby-workspace"
},
"data": {
"volumes": [
{
"path": "/home/coder",
"threshold": "90%"
},
{
"path": "/dev/coder",
"threshold": "80%"
},
{
"path": "/etc/coder",
"threshold": "95%"
}
]
}
},
"title": "Your workspace \"bobby-workspace\" is low on volume space",
"title_markdown": "Your workspace \"bobby-workspace\" is low on volume space",
"body": "Hi Bobby,\n\nThe following volumes are nearly full in workspace bobby-workspace\n\n/home/coder is over 90% full\n/dev/coder is over 80% full\n/etc/coder is over 95% full",
"body_markdown": "Hi Bobby,\n\nThe following volumes are nearly full in workspace **bobby-workspace**\n\n- **`/home/coder`** is over 90% full\n- **`/dev/coder`** is over 80% full\n- **`/etc/coder`** is over 95% full\n"
}
@@ -0,0 +1,28 @@
{
"_version": "1.1",
"msg_id": "00000000-0000-0000-0000-000000000000",
"payload": {
"_version": "1.1",
"notification_name": "Workspace Out Of Memory",
"notification_template_id": "00000000-0000-0000-0000-000000000000",
"user_id": "00000000-0000-0000-0000-000000000000",
"user_email": "bobby@coder.com",
"user_name": "Bobby",
"user_username": "bobby",
"actions": [
{
"label": "View workspace",
"url": "http://test.com/@bobby/bobby-workspace"
}
],
"labels": {
"threshold": "90%",
"workspace": "bobby-workspace"
},
"data": null
},
"title": "Your workspace \"bobby-workspace\" is low on memory",
"title_markdown": "Your workspace \"bobby-workspace\" is low on memory",
"body": "Hi Bobby,\n\nYour workspace bobby-workspace has reached the memory usage threshold set at 90%.",
"body_markdown": "Hi Bobby,\n\nYour workspace **bobby-workspace** has reached the memory usage threshold set at **90%**."
}