5.11. Notification plans

A notification plan contains a set of notification actions that Rackspace Cloud Monitoring executes when triggered by an alarm. Rackspace Cloud 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

A notification plan, npTechnicalContactsEmail, is provided by default which will email all of the technical contacts on file for an account whenever there is a state change.

Table 5.12. Attributes
NameDescriptionValidation
label Friendly name for the notification plan.
  • String between 1 and 255 characters long

critical_state The notification list to send to when the state is CRITICAL.
  • Optional

  • Array [Valid Notification]

metadata Arbitrary 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_state The notification list to send to when the state is OK.
  • Optional

  • Array [Valid Notification]

warning_state The notification list to send to when the state is WARNING.
  • Optional

  • Array [Valid Notification]

Use the notification plan API operations to create, view, and manage notification plan resources.

MethodURIDescription
POST/notification_plans

Creates a notification plan.

GET/notification_plans

Lists the notification plans for the Rackspace Cloud Monitoring account.

GET/notification_plans/{notificationPlanId}

Returns information about the specified notification plan.

PUT/notification_plans/{notificationPlanId}

Updates the notification plan properties.

DELETE/notification_plans/{notificationPlanId}

Delete a notification plan from your account.

 5.11.1. Create notification plan

 
MethodURIDescription
POST/notification_plans

Creates a notification plan.

Create a new notification in the monitoring system by using a valid set of attributes from the Notifications Plan Attributes table.

This table shows the possible response codes for this operation:

Response CodeNameDescription
201Accepted

'Location' header contains a link to the newly created notification plan.

400Bad request

The system received an invalid value in a request.

401Unauthorized

The system received a request from a user that is not authenticated.

403Forbidden

The system received a request that the user is not authorized to make.

500Internal Server Error

An unexpected condition was encountered.

503Service Unavailable

The system is experiencing heavy load or another system failure.

 5.11.1.1. Request

This table shows the header parameters for the create notification plan request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access.

This table shows the body parameters for the create notification plan request:

NameTypeDescription

label

​String

(Required)

Friendly name for the notification plan, between 1 and 255 characters long.

critical_state

​Array

(Optional)

An array that defines the notification list to send to when the state is CRITICAL.

metadata

​Hash

(Optional)

Update metadata information on the account, or add a new metadata item. Metadata is formatted in key/value string pairs. The key and value attributes are string values between 1 and 255 characters long.

ok_state

​Array

(Optional)

An array that defines the notification list to send to when the state is OK.

 

Example 5.74. Create notification plan: XML request

<?xml version="1.0" encoding="utf-8"?>
<notification_plan>
  <label>Notification Plan 1</label>
  <critical_state>
    <notification_id>ntAAAA</notification_id>
  </critical_state>
  <warning_state>
    <notification_id>ntCCCCC</notification_id>
  </warning_state>
  <ok_state>
    <notification_id>ntBBBB</notification_id>
  </ok_state>
</notification_plan>

 

Example 5.75. Create notification plan: JSON request

{
    "label": "Notification Plan 1",
    "critical_state": [
        "ntAAAA"
    ],
    "warning_state": [
        "ntCCCCC"
    ],
    "ok_state": [
        "ntBBBB"
    ]
}

 5.11.2. List notification plans

 
MethodURIDescription
GET/notification_plans

Lists the notification plans for the Rackspace Cloud Monitoring account.

This operation can be paginated. For information, see Paginated collections

This table shows the possible response codes for this operation:

Response CodeNameDescription
200OK

Request completed.

401Unauthorized

The system received a request from a user that is not authenticated.

403Forbidden

The system received a request that the user is not authorized to make.

500Internal Server Error

An unexpected condition was encountered.

503Service Unavailable

The system is experiencing heavy load or another system failure.

 5.11.2.1. Request

This table shows the header parameters for the list notification plans request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access.

This operation does not accept a request body.

 5.11.2.2. Response

 

Example 5.76. List notification plans: XML response

<?xml version="1.0" encoding="utf-8"?>
<container>
  <values>
    <notification_plan>
      <label>Notification Plan 1</label>
      <critical_state>
        <notification_id>ntAAAA</notification_id>
      </critical_state>
      <warning_state>
        <notification_id>ntCCCCC</notification_id>
      </warning_state>
      <ok_state>
        <notification_id>ntBBBB</notification_id>
      </ok_state>
    </notification_plan>
  </values>
  <metadata>
    <count>1</count>
    <limit>50</limit>
    <marker/>
    <next_marker/>
    <next_href/>
  </metadata>
</container>

 

Example 5.77. 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
    }
}

 5.11.3. Get notification plan by ID

 
MethodURIDescription
GET/notification_plans/{notificationPlanId}

Returns information about the specified notification plan.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200OK

Request completed.

401Unauthorized

The system received a request from a user that is not authenticated.

403Forbidden

The system received a request that the user is not authorized to make.

500Internal Server Error

An unexpected condition was encountered.

503Service Unavailable

The system is experiencing heavy load or another system failure.

 5.11.3.1. Request

This table shows the header parameters for the get notification plan by id request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access.

This operation does not accept a request body.

 5.11.3.2. Response

 

Example 5.78. Get notification plan by ID: XML response

<?xml version="1.0" encoding="utf-8"?>
<notification_plan>
  <label>Notification Plan 1</label>
  <critical_state>
    <notification_id>ntAAAA</notification_id>
  </critical_state>
  <warning_state>
    <notification_id>ntCCCCC</notification_id>
  </warning_state>
  <ok_state>
    <notification_id>ntBBBB</notification_id>
  </ok_state>
</notification_plan>

 

Example 5.79. Get notification plan by ID: JSON response

{
    "label": "Notification Plan 1",
    "critical_state": [
        "ntAAAA"
    ],
    "warning_state": [
        "ntCCCCC"
    ],
    "ok_state": [
        "ntBBBB"
    ]
}

 5.11.4. Update notification plan by ID

 
MethodURIDescription
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.

This table shows the possible response codes for this operation:

Response CodeNameDescription
400Bad request

The system received an invalid value in a request.

401Unauthorized

The system received a request from a user that is not authenticated.

403Forbidden

The system received a request that the user is not authorized to make.

404Not Found

The URL or entity requested is not found in the system.

500Internal Server Error

An unexpected condition was encountered.

503Service Unavailable

The system is experiencing heavy load or another system failure.

 5.11.4.1. Request

This table shows the header parameters for the update notification plan by id request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access.

 

Example 5.80. Update notification plan: XML request

<?xml version="1.0" encoding="utf-8"?>
<notification_plan>
  <critical_state>
    <notification_id>ntBBBB</notification_id>
  </critical_state>
  <warning_state/>
</notification_plan>

 

Example 5.81. Update notification plan: JSON request

{
    "critical_state": [
        "ntBBBB"
    ],
    "warning_state": []
}

 5.11.5. Delete notification plan

 
MethodURIDescription
DELETE/notification_plans/{notificationPlanId}

Delete a notification plan from your account.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200OK

The request completed.

401Unauthorized

The system received a request from a user that is not authenticated.

403Forbidden

The system received a request that the user is not authorized to make.

404Not Found

The URL or entity requested is not found in the system.

500Internal Server Error

An unexpected condition was encountered.

503Service Unavailable

The system is experiencing heavy load or another system failure.

 5.11.5.1. Request

This table shows the header parameters for the delete notification plan request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access.

This operation does not accept a request body.



loading table of contents...