4.9. Notification plans

 4.9.1. Summary

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 and email 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.

 4.9.2. Attributes

Table 4.11. 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]

 4.9.3. Create notification plan

Verb URI Description
POST /notification_plans Create a notification plan.

Normal Response Code: (201) 'Location' header contains a link to the newly created notification plan.

Error Response Codes: 400, 401, 403, 500, 503

 

Example 4.58. Notification plan create request: XML

<?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 4.59. Notification plan create request: JSON

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


 4.9.4. List Notification plans

Verb URI Description
GET /notification_plans Lists the notification plans for this particular account.

There are no parameters for this call.

Normal Response Code: 200

Error Response Codes: 401, 403, 500, 503

 

Example 4.60. List notification plans response: XML

<?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 4.61. List notification plans response: JSON

{
    "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
    }
}


 4.9.5. Get notification plan

Verb URI Description
GET /notification_plans/notificationPlanId Get information for a single notification plan.

There are no parameters for this call.

Normal Response Code: 200

Error Response Codes: 401, 403, 500, 503

 

Example 4.62. Get notification plan response: XML

<?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 4.63. Get List notification plan response: JSON

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


 4.9.6. Update notification plans

Verb URI Description
PUT /notification_plans/notificationPlanId Update a notification plan with the specified notificationPlanId. Partial updates to a notification plan are acceptable. You may specify only the parameters you would like to update.

Normal Response Code: (204) This code contains no content with an empty response body.

Error Response Codes: 400, 401, 403, 404, 500, 503

 

Example 4.64. Notification plan update request: XML

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


 

Example 4.65. Notification plan update request: JSON

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


 4.9.7. Delete notification plans

Verb URI Description
DELETE /notification_plans/notificationPlanId Deletes a notification plan.

Normal Response Code: (204) This code contains no content with an empty response body.

Error Response Codes: 401, 403, 404, 500, 503



loading table of contents...