Notification plans¶
A notification plan contains a set of notification actions that Rackspace Monitoring executes when triggered by an alarm. Rackspace Monitoring currently supports webhook, email, PagerDuty, and SMS notifications.
Each notification state can contain multiple notification actions. For example, you can create a notification plan that hits a webhook/email to notify your operations team if a warning occurs. However, if the warning escalates to an Error, the notification plan could be configured to hit a different webhook/email that triggers both email and SMS messages to the operations team.
The notification plan supports the following states:
Critical
Warning
OK
The default npTechnicalContracsEmail
notification plan emails all
technical contacts on file for an account whenever the state changes.
The following table describes the attributes for the notification plan resource.
Name |
Description |
Validation |
---|---|---|
label |
Friendly name for the notification. |
|
critical_state |
The notification list to send to when the state is CRITICAL. |
|
metadata |
Arbitrary key/value pairs. |
|
ok_state |
The notification list to send to when the state is OK. |
|
warning_state |
The notification list to send to when the state is WARNING. |
|
Use the following notification plan API operations to create, view, and manage notification plan resources.
Create a notification plan¶
POST /notification_plans
Create a new notification in the monitoring system by using a valid set of attributes from the notification plans table.
The following table shows the possible response codes for this operation:
Response Code |
Name |
Description |
---|---|---|
201 |
Accepted |
‘Location’ header contains a link to the newly created notification plan. |
400 |
Bad request |
The system received an invalid value in a request. |
401 |
Unauthorized |
The system received a request from a user that is not authenticated. |
403 |
Forbidden |
The system received a request that the user is not authorized to make. |
500 |
Internal Server Error |
An unexpected condition was encountered. |
503 |
Service Unavailable |
The system is experiencing heavy load or another system failure. |
Request¶
The following table shows the header parameters for the request:
Name |
Type |
Description |
---|---|---|
X-Auth-Token |
String (Required) |
A valid authentication token with administrative access. For details, see Get your credentials |
Example Create notification plan: JSON request
{
"label": "Notification Plan 1",
"critical_state": [
"ntAAAA"
],
"warning_state": [
"ntCCCCC"
],
"ok_state": [
"ntBBBB"
]
}
Response¶
This operation does not return a response body.
List notification plans¶
GET /notification_plans
Lists the notification plans for the Rackspace Cloud Monitoring account.
Use /notification_plans?id=notification_planOneId & id=notification_planTwoId
to filter the results to only include information about the specified
notification plans.
This operation can be paginated. For information, see Paginated collections.
The following table shows the possible response codes for this operation:
Response Code |
Name |
Description |
---|---|---|
200 |
OK |
Request completed. |
401 |
Unauthorized |
The system received a request from a user that is not authenticated. |
403 |
Forbidden |
The system received a request that the user is not authorized to make. |
500 |
Internal Server Error |
An unexpected condition was encountered. |
503 |
Service Unavailable |
The system is experiencing heavy load or another system failure. |
Request¶
The following table shows the header parameters for the request:
Name |
Type |
Description |
---|---|---|
X-Auth-Token |
String (Required) |
A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Response¶
Example List notification plans: JSON response
{
"values": [
{
"label": "Notification Plan 1",
"critical_state": [
"ntAAAA"
],
"warning_state": [
"ntCCCCC"
],
"ok_state": [
"ntBBBB"
]
}
],
"metadata": {
"count": 1,
"limit": 50,
"marker": null,
"next_marker": null,
"next_href": null
}
}
Get a notification plan by ID¶
GET /notification_plans/{notificationPlanId}
Returns information about the specified notification plan.
The following table shows the possible response codes for this operation:
Response Code |
Name |
Description |
---|---|---|
200 |
OK |
Request completed. |
401 |
Unauthorized |
The system received a request from a user that is not authenticated. |
403 |
Forbidden |
The system received a request that the user is not authorized to make. |
500 |
Internal Server Error |
An unexpected condition was encountered. |
503 |
Service Unavailable |
The system is experiencing heavy load or another system failure. |
Request¶
This table shows the header parameters for the request:
Name |
Type |
Description |
---|---|---|
X-Auth-Token |
String (Required) |
A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Response¶
Example Get notification plan by ID: JSON response
{
"label": "Notification Plan 1",
"critical_state": [
"ntAAAA"
],
"warning_state": [
"ntCCCCC"
],
"ok_state": [
"ntBBBB"
]
}
Update a notification plan by ID¶
PUT /notification_plans/{notificationPlanId}
Updates the notification plan properties.
You can make partial updates to a notification plan. When you submit the update request, only specify the parameters you want to update.
Update a notification in the monitoring system by using a valid set of attributes from the notification plans table.
The following table shows the possible response codes for this operation:
Response Code |
Name |
Description |
---|---|---|
400 |
Bad request |
The system received an invalid value in a request. |
401 |
Unauthorized |
The system received a request from a user that is not authenticated. |
403 |
Forbidden |
The system received a request that the user is not authorized to make. |
404 |
Not Found |
The URL, entity, or account requested is not found in the system. |
500 |
Internal Server Error |
An unexpected condition was encountered. |
503 |
Service Unavailable |
The system is experiencing heavy load or another system failure. |
Request¶
The following table shows the header parameters for the request:
Name |
Type |
Description |
---|---|---|
X-Auth-Token |
String (Required) |
A valid authentication token with administrative access. For details, see Get your credentials |
Example Update notification plan: JSON request
{
"critical_state": [
"ntBBBB"
],
"warning_state": []
}
Response¶
This operation does not return a response body.
Delete a notification plan¶
DELETE /notification_plans/{notificationPlanId}
Delete a notification plan from your account.
The following table shows the possible response codes for this operation:
Response Code |
Name |
Description |
---|---|---|
200 |
OK |
The request completed. |
401 |
Unauthorized |
The system received a request from a user that is not authenticated. |
403 |
Forbidden |
The system received a request that the user is not authorized to make. |
404 |
Not Found |
The URL, entity, or account requested is not found in the system. |
500 |
Internal Server Error |
An unexpected condition was encountered. |
503 |
Service Unavailable |
The system is experiencing heavy load or another system failure. |
Request¶
The following table shows the header parameters for the request:
Name |
Type |
Description |
---|---|---|
X-Auth-Token |
String (Required) |
A valid authentication token with administrative access. See s Get your credentials |
Note
This operation does not accept a request body.
Response¶
This operation does not return a response body.