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.

Concept: Notification plan, in Monitoring key terms and concepts

Requirements: A notification

Next step: Create an alarm

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.14. 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​{?id}

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 on the specified notification plans.

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 a 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 notification plans 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 a notification plan request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access. For details, see Retrieving an authentication token

 

Example 5.40. Create notification plan: JSON request

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

This operation does not accept a request body.

 5.11.2. List notification plans

 
MethodURIDescription
GET/notification_plans​{?id}

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 on the specified notification plans.

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. For details, see Retrieving an authentication token

This operation does not accept a request body.

 5.11.2.2. Response

 

Example 5.41. 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 a 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 a notification plan by id request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access. For details, see Retrieving an authentication token

This operation does not accept a request body.

 5.11.3.2. Response

 

Example 5.42. Get notification plan by ID: JSON response

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

 5.11.4. Update a 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.

Update a notification in the monitoring system by using a valid set of attributes from the notification plans table.

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, entity, or account 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 a notification plan by id request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access. For details, see Retrieving an authentication token

 

Example 5.43. Update notification plan: JSON request

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

 5.11.5. Delete a 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, entity, or account 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 a notification plan request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token with administrative access. For details, see Retrieving an authentication token

This operation does not accept a request body.



Contents Search
loading table of contents...