Notification Plans

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.

Attributes

The following table describes the attributes for the notification plan resource.

NameDescriptionValidation
labelFriendly name for the notification.* String between 1 and 255 characters long
critical_stateThe notification list to send to when the state is CRITICAL. Optional

Array [Valid Notification]
metadataArbitrary key/value pairs. Optional

Hash [String,String between 1 and 255 characters long:String, String between 1 and 255 characters long]

* Array or object with number of items between 0 and 256
ok_stateThe notification list to send to when the state is OK. Optional

Array [Valid Notification]
warning_stateThe notification list to send to when the state is WARNING. Optional

Array [Valid Notification]

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 CodeNameDescription
201Accepted‘Location’ header contains a link to the newly created notification plan.
400Bad requestThe system received an invalid value in a request.
401UnauthorizedThe system received a request from a user that is not authenticated.
403ForbiddenThe system received a request that the user is not authorized to make.
500Internal Server ErrorAn unexpected condition was encountered.
503Service UnavailableThe system is experiencing heavy load or another system failure.

Request

The following table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenString (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 CodeNameDescription
200OKRequest completed.
401UnauthorizedThe system received a request from a user that is not authenticated.
403ForbiddenThe system received a request that the user is not authorized to make.
500Internal Server ErrorAn unexpected condition was encountered.
503Service UnavailableThe system is experiencing heavy load or another system failure.

Request

The following table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenString (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 CodeNameDescription
200OKRequest completed.
401UnauthorizedThe system received a request from a user that is not authenticated.
403ForbiddenThe system received a request that the user is not authorized to make.
500Internal Server ErrorAn unexpected condition was encountered.
503Service UnavailableThe system is experiencing heavy load or another system failure.

Request

This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenString (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 CodeNameDescription
400Bad requestThe system received an invalid value in a request.
401UnauthorizedThe system received a request from a user that is not authenticated.
403ForbiddenThe system received a request that the user is not authorized to make.
404Not FoundThe URL, entity, or account requested is not found in the system.
500Internal Server ErrorAn unexpected condition was encountered.
503Service UnavailableThe system is experiencing heavy load or another system failure.

Request

The following table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenString (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 CodeNameDescription
200OKThe request completed.
401UnauthorizedThe system received a request from a user that is not authenticated.
403ForbiddenThe system received a request that the user is not authorized to make.
404Not FoundThe URL, entity, or account requested is not found in the system.
500Internal Server ErrorAn unexpected condition was encountered.
503Service UnavailableThe system is experiencing heavy load or another system failure.

Request

The following table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenString (Required)A valid authentication token with administrative access. See Get your credentials

Note

This operation does not accept a request body.

Response

This operation does not return a response body.