Client API: Cloud Compute alerts
Monitoring alerts on an instance: CPU, disk, data transfer this month and down, each emailed when it fires and when it clears.
Monitoring alerts on an instance: CPU, disk, data transfer this month and down, each emailed when it fires and when it clears. Paths are under /api/v1/client/vps/{uuid}/alerts.
Base URL: https://api.coritan.com/api/v1. Paths below are complete.
To try these requests in the browser, open the interactive Client API reference.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/client/vps/{uuid}/alerts |
List alerts |
| POST | /api/v1/client/vps/{uuid}/alerts |
Add an alert |
| PATCH | /api/v1/client/vps/{uuid}/alerts/{rule_uuid} |
Change an alert's threshold, duration or port, pause it, or stop its emails |
| DELETE | /api/v1/client/vps/{uuid}/alerts/{rule_uuid} |
Delete an alert |
List alerts
Section titled List alertsGET /api/v1/client/vps/{uuid}/alerts
The instance's alert rules with where each stands, its last 50 alert events, and the metrics on offer.
404 while monitoring alerts are off.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Add an alert
Section titled Add an alertPOST /api/v1/client/vps/{uuid}/alerts
Add an alert. 422 names what is wrong with a field; 409 once the instance holds the most it may.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
metric |
string | yes | cpu, disk, bandwidth or down. |
threshold |
integer or null | no | cpu and disk: percent, 1 to 100. bandwidth: GB this month. Not used for down. |
duration_minutes |
integer or null | no | cpu and down: minutes the condition must hold, 1 to 1440 (default 5 and 3). |
port |
integer or null | no | down only: a TCP port that must answer on the instance's IPv4 address. |
notify_email |
boolean | no | Email the account when the alert fires and when it clears. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Change an alert's threshold, duration or port, pause it, or stop its emails
Section titled Change an alert's threshold, duration or port, pause it, or stop its emailsPATCH /api/v1/client/vps/{uuid}/alerts/{rule_uuid}
Change an alert's threshold, duration or port, pause it, or stop its emails. A changed condition starts it over.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
rule_uuid |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
threshold |
integer or null | no |
duration_minutes |
integer or null | no |
port |
integer or null | no |
enabled |
boolean or null | no |
notify_email |
boolean or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Delete an alert
Section titled Delete an alertDELETE /api/v1/client/vps/{uuid}/alerts/{rule_uuid}
Delete an alert. Its past events stay in the history.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
rule_uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |