Notification types

The notification type categorizes the notifications that you can configure. When you create a notification, you must specify one of the following Rackspace Monitoring notification types:

NotificationDescription
EmailAlerts where the message is delivered to a specified address.
WebhookIndustry-standard web hooks, where JSON is posted to a configurable URL.
PagerDutyAn incident management system integrated with Rackspace Monitoring.
SMSText alerts where the message is delivered to any phone number.
VictorOpsAn incident management system integrated with Rackspace Monitoring.

The following sections describe the attributes associated with each notification type and provide information about the notification type API operations available to retrieve notification type information.

Email notification type

The email notification takes the following parameters:

NameDescriptionValidation
addressEmail address to send notifications to* Email address

Webhook notification type

The webhook notification takes the following parameters:

NameDescriptionValidation
urlAn HTTP or HTTPS URL to POST to* URL

Example: 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,
"collectorState": "UP"
}
]
},
"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": 30,
"period": 60,
"target_alias": "default",
"target_hostname": "",
"target_resolver": "",
"disabled": false,
"metadata": null,
"confd_name": null,
"confd_hash": null,
"active_suppressions": null,
"scheduled_suppressions": null,
"created_at": 1326905540481,
"updated_at": 1326905540481
},
"alarm": {
"id": "alOne",
"label": "Alarm 1",
"check_id": "chOne",
"entity_id": "enOne",
"criteria": "if (metric[\"t\"] >= 2.1) { return WARNING } return WARNING",
"disabled": false,
"notification_plan_id": "npOne",
"metadata": null,
"confd_name": null,
"confd_hash": null,
"active_suppressions": null,
"scheduled_suppressions": null,
"created_at": 1326905540481,
"updated_at": 1326905540481
},
"tenant_id": "91111"
}

The following fields are contained within a single payload:

FieldDescription
eventIDThe ID for the event in the system.
logEntryIDThe ID for the log entry.
entityThe entity record that triggered the alert.
checkThe check record that triggered the alert.
alarmThe alarm record that triggered the alert.

The following fields will be populated in the request header when your webhook is called:

Header fieldDescription
x-rackspace-webhook-tokenThe 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.

PagerDuty notification type

To use PagerDuty with Rackspace Monitoring, go to the PagerDuty website and sign up for an account. You will get an API Key in PagerDuty to be used when setting up the PagerDuty notification. To learn how to use this notification type, read the PagerDuty blog Rackspace Monitoring Now Integrates with PagerDuty.

NameDescriptionValidation
service_keyThe PagerDuty service key to use Alphanumeric string

String between 1 and 32 characters long
**service_endpointThe PagerDuty service endpoint to use URL

Optional

SMS notification type

A notification sent by text to your phone, including international phone numbers; for example +15551234567. Standard text messaging rates charged by your phone service provider will apply.

NameDescriptionValidation
phone_numberPhone number to send the notification to, with leading + and country code (E.164 format)* String matching the regex //^+[0-9]{6,15}$//

VictorOps notification type

A notification sent as a webhook to your VictorOps account.

To use VictorOps with Rackspace Monitoring, go to the VictorOps website and sign up for an account. You will get an API key and configure routing keys for the teams in VictorOps. The API key and routing key will be used when setting up the VictorOps notification. To learn more about this notification type, read the VictorOps blog Internet Age of Unix Philosophy and visit the VictorOps Knowledge Base.

NameDescriptionValidation
routing keyThe optional VictorOps routing_key to use with Rackspace Monitoring. You create a routing_key in VictorOps for team on-call configuration.(/^[a-zA-Z0-9-_.]+$/)
api keyThe VictorOps api_key to use with Rackspace Monitoring. You get this when you sign up for a VictorOps account.UUID v4 format

Notification types API operations

Use the following API operations to review information about notification types.

List notification types

GET /notification_types

Lists available notification types.

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

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.
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 types: JSON response

{
"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
}
]
},
{
"id": "sms",
"fields": [
{
"name": "phone_number",
"description": "Phone number to send the notification to, with
leading + and country code (E.164 format)",
"optional": false
}
]
},
{
"id": "managed",
"fields": null
},
{
"id": "technicalContactsEmail",
"fields": null
},
{
"id": "atomHopper",
"fields": [
{
"name": "category",
"description": "A category by which to identify this notification.
Categories will be prefixed by 'monitoring.alerts.',
so they will end up looking like:
'monitoring.alerts.USER_DEFINED_CATEGORY'",
"optional": false
}
]
},
{
"id": "victorops",
"fields": [
{
"name": "api_key",
"description": "The VictorOps api key to use.",
"optional": false
},
{
"name": "routing_key",
"description": "The VictorOps routing key to use.",
"optional": false
}
]
}
],
"metadata": {
"count": 8,
"limit": 50,
"marker": null,
"next_marker": null,
"next_href": null
}
}

Get a notification type by ID

GET /notification_types/{notificationTypeId}

Returns information about the specified Notification type.

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.
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 type by ID: JSON response

{
"id": "webhook",
"fields": [
{
"name": "url",
"description": "An HTTP or HTTPS URL to POST to",
"optional": false
}
]
}