The notification type represents the type of notification. When you create a notification in Rackspace Cloud Monitoring, you must specify the notification type. Rackspace Cloud Monitoring currently supports the following notification types:
- Webhook
Industry-standard web hooks, where JSON is posted to a configurable URL.
Email alerts where the message is delivered to a specified address.
A notification sent by email.
| Name | Description | Validation |
| address | Email address to send notifications to |
|
The webhook notification takes the following parameters:
| Name | Description | Validation |
| url | An HTTP or HTTPS URL to POST to |
|
Example 4.94. Webhook Notification POST to a Specified URL with JSON Payload
{
"event_id": "acOne:enOne:alOne:chOne:1326910500000:WARNING",
"log_entry_id": "6da55310-4200-11e1-aaaf-cd4c8801b6b1",
"details": {
"target": null,
"timestamp": 1326905540481,
"metrics": {
"tt_firstbyte": {
"type": "I",
"data": 2,
"unit": "milliseconds"
},
"duration": {
"type": "I",
"data": 2,
"unit": "milliseconds"
},
"bytes": {
"type": "i",
"data": 17,
"unit": "bytes"
},
"tt_connect": {
"type": "I",
"data": 0,
"unit": "milliseconds"
},
"code": {
"type": "s",
"data": "200",
"unit": "unknown"
}
},
"state": "WARNING",
"status": "warn.",
"txn_id": "sometransaction",
"collector_address_v4": "127.0.0.1",
"collector_address_v6": null,
"observations": [
{
"monitoring_zone_id": "mzOne",
"state": "WARNING",
"status": "warn.",
"timestamp": 1326905540481
}
]
},
"entity": {
"id": "enOne",
"label": "entity one",
"ip_addresses": {
"default": "127.0.0.1"
},
"metadata": null,
"managed": false,
"uri": null,
"agent_id": null,
"created_at": 1326905540481,
"updated_at": 1326905540481
},
"check": {
"id": "chOne",
"label": "ch a",
"type": "remote.http",
"details": {
"url": "http://www.foo.com",
"body": "b",
"method": "GET",
"follow_redirects": true,
"include_body": false
},
"monitoring_zones_poll": [
"mzOne"
],
"timeout": 60,
"period": 150,
"target_alias": "default",
"target_hostname": "",
"target_resolver": "",
"disabled": false,
"metadata": null,
"created_at": 1326905540481,
"updated_at": 1326905540481
},
"alarm": {
"id": "alOne",
"label": "Alarm 1",
"check_type": "remote.http",
"check_id": null,
"criteria": "if (metric[\"t\"] >= 2.1) { return WARNING } return WARNING",
"disabled": false,
"notification_plan_id": "npOne",
"metadata": null,
"created_at": 1326905540481,
"updated_at": 1326905540481
},
"tenant_id": "91111"
}
The following fields are contained within a single payload:
| Field | Description |
| eventId | The ID for the event in the system. |
| logEntryId | The ID for the log entry. |
| entity | The entity record that triggered the alert. |
| check | The check record that triggered the alert. |
| alarm | The alarm record that triggered the alert. |
The following fields will be populated in the request header when your webhook is called.
| Header Field | Description |
| x-rackspace-webhook-token | The webhook token defined in an account. This is used in your web application to verify that your webhook is called by an authorized Rackspace service. |
| Verb | URI | Description | |||||
| GET | /notification_types | Lists available notification types. | |||||
There are no parameters for this call.
Normal Response Code: 200
Error Response Codes: 401, 403, 500, 503
Example 4.95. List Notification Types Response: XML
<?xml version="1.0" encoding="utf-8"?>
<container>
<values>
<notification_type id="webhook">
<fields>
<field>
<name>url</name>
<description>An HTTP or HTTPS URL to POST to</description>
<optional>false</optional>
</field>
</fields>
</notification_type>
<notification_type id="email">
<fields>
<field>
<name>address</name>
<description>Email address to send notifications to</description>
<optional>false</optional>
</field>
</fields>
</notification_type>
<notification_type id="pagerduty">
<fields>
<field>
<name>service_key</name>
<description>The PagerDuty service key to use.</description>
<optional>false</optional>
</field>
</fields>
</notification_type>
</values>
<metadata>
<count>3</count>
<limit>50</limit>
<marker/>
<next_marker/>
<next_href/>
</metadata>
</container>
Example 4.96. List Notification Types Response: JSON
{
"values": [
{
"id": "webhook",
"fields": [
{
"name": "url",
"description": "An HTTP or HTTPS URL to POST to",
"optional": false
}
]
},
{
"id": "email",
"fields": [
{
"name": "address",
"description": "Email address to send notifications to",
"optional": false
}
]
},
{
"id": "pagerduty",
"fields": [
{
"name": "service_key",
"description": "The PagerDuty service key to use.",
"optional": false
}
]
}
],
"metadata": {
"count": 3,
"limit": 50,
"marker": null,
"next_marker": null,
"next_href": null
}
}
| Verb | URI | Description | |||||
| GET | /notification_types/notificationTypeId |
Get information for a single notification type. | |||||
There are no parameters for this call.
Normal Response Code: 200
Error Response Codes: 401, 403, 500, 503
Example 4.97. Get Notification Type Response: XML
<?xml version="1.0" encoding="utf-8"?>
<notification_type id="webhook">
<fields>
<field>
<name>url</name>
<description>An HTTP or HTTPS URL to POST to</description>
<optional>false</optional>
</field>
</fields>
</notification_type>
Example 4.98. Get Notification Type Response: JSON
{
"id": "webhook",
"fields": [
{
"name": "url",
"description": "An HTTP or HTTPS URL to POST to",
"optional": false
}
]
}

