Notifications¶
ComputeStacks offers hooks into key events, which allow you to receive notifications on various channels.
Available Notifications¶
Users¶
For end-users, you have access to the following notifications:
| Name | Description |
|---|---|
| ContainerBootFailed | Attempt to automatically recover a container has failed |
| ContainerCreated | Container is created |
| ContainerCpuUsage | Container CPU usage has been above 85% for more than 1 minute |
| ContainerDestroyed | Container has been deleted |
| ContainerMemoryUsage | Container memory usage has been above 85% for more than 1 minute |
Administrators¶
This is in addition to the notifications available to users.
| Name | Description |
|---|---|
| NewOrder | A new order is receive |
| UserActivated | A user is unsuspended |
| UserCreated | A user is created |
| UserDeleted | A user is deleted |
| UserSuspended | A user is suspended |
| DiskWillFillIn4Hours | A disk on a node will be full in 4 hours at the current rate |
| ExporterDown | A node exporter has failed |
| HighCpuLoad | A node has excessive cpu usage |
| NodeUp | A node has come online |
| OutOfDiskSpace | A node is out of disk space |
| OutOfInodes | A node is out of disk inodes |
| OutOfMemory | A node is out of memory |
| UnusualDiskReadLatency | Unusual disk read latency |
| UnusualDiskWriteLatency | Unusual disk write latency |
Notification Channels¶
Email¶
Sends an email to the specified address
Google Chat¶
To generate a webhook url, navigate to your google chat room and select the dropdown icon next to the room name; select Manage webhooks.
Keybase¶
To generate a webhook url, navigate to the chat room and click the (i) icon in the upper right-hand corner. Choose 'Bots' and add the Webhook Bot.
Matrix¶
New to Matrix? We recommend deploying your own Matrix installation using this ansible playbook.
Our integration was designed to work with the appservice-webhooks bridge.
If you're using the ansible playbook listed above to manage your Matrix installation, you may use these instructions to get this setup.
Microsoft Teams¶
This integration is in beta, please share your feedback!
Send webhook to a Microsoft Teams channel. Learn More
Slack¶
Uses the standard incoming webhook integration.
Webhook¶
Sends a json POST request to an endpoint of your choice.
Your endpoint must respond with a 20x http code, otherwise we will continue to send the notification.
The message we send will be formatted with markdown formatting. Specifically, we use * to denote bold fields, and \\n to denote new lines.
{
"text": "*Sample Description*\\n<http://url.to.alert|View Alert>\\n*Container:* container-name-123\\n*Label:* Value"
}
Server Maintenance and Outages¶
When the server (node) running your containers is in maintenance or offline, the portal tells you so:
- A banner on the project and service pages says whether the server is undergoing maintenance or is offline, since when, and which actions are affected.
- A Maintenance or Offline label appears next to the project in the project list, and on the container's page.
If your provider has added a message for customers, such as the reason for the work or when it should be finished, the banner shows it too. The message clears itself once the server is back online.
While the server is in maintenance or offline, some actions behave differently:
| Action | Maintenance | Offline |
|---|---|---|
| Start, stop, restart, rebuild | Deferred: runs when maintenance ends | Refused |
| Backups, restores, deleting and downloading backups | Refused | Refused |
| Adding containers to a service | Refused | Refused |
| Resetting the SSH password | Refused | Refused |
| Configuration changes | Available | Saved, and applied once the server is back online |
A deferred request waits, with its event saying so, and runs once maintenance ends. Only the latest request for a container is kept: if you ask for a restart and then a stop, the restart is canceled and the stop runs. This includes restarts that apply a change you've already saved, so the change takes effect after maintenance rather than being lost.
A refused request fails straight away with a message explaining that the server is in maintenance or offline. Try again once it's back online. Removing containers is always allowed.
The API reports the same information in a node_status object on projects, services, containers, SSH containers and availability zones, and refused requests return 409 with the reason.