5.9. Notification types

The notification type represents the type of notification you can configure. When you create a notification in Rackspace Cloud Monitoring, you must specify the notification type. Rackspace Cloud Monitoring currently supports the following notification types:

Email

Email alerts where the message is delivered to a specified address.

Webhook

Industry-standard web hooks, where JSON is posted to a configurable URL.

PagerDuty

Use PagerDuty, an incident management system, integrated with Rackspace Cloud Monitoring.

SMS

Text alerts where the message is delivered to any phone number.

VictorOps

Use VictorOps, an incident management system, integrated with Rackspace Cloud Monitoring.

Concept: Notification and notification type, in Monitoring key terms and concepts

Next step: Create a notification

 5.9.1. Email notification type

A notification sent by email.

Table 5.8. Attributes
NameDescriptionValidation
address Email address to send notifications to
  • Email address

 5.9.2. Webhook notification type

The webhook notification takes the following parameters:

Table 5.9. Attributes
NameDescriptionValidation
url An HTTP or HTTPS URL to POST to
  • URL

 

Example 5.27. 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_type": "remote.http",
        "check_id": null,
        "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"
}


 5.9.2.1. Notification payload

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.

 5.9.2.2. Notification header contents

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.

 5.9.3. PagerDuty notification type

A notification sent through PagerDuty.

To use PagerDuty with Cloud 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 Cloud Monitoring Now Integrates with PagerDuty .

Table 5.10. Attributes
NameDescriptionValidation
service_key The PagerDuty service key to use.
  • Alphanumeric string

  • String between 1 and 32 characters long

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

Table 5.11. Attributes
NameDescriptionValidation
phone_number Phone number to send the notification to, with leading + and country code (E.164 format)
  • String matching the regex //^\+[0-9]{6,15}$//

 5.9.5. VictorOps notification type

A notification sent as a webhook to your VictorOps account.

To use VictorOps with Cloud 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.

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

 5.9.6. Notification types API operations

Use the notification types API operations to view and manage notifications.

[Note]Note

Users cannot create, update, or delete notification types.

MethodURIDescription
GET/notification_types

Lists available notification types.

GET/notification_types/{notificationTypeId}

Returns information about the specified Notification type.

 5.9.6.1. List notification types

 
MethodURIDescription
GET/notification_types

Lists available notification types.

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

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.

500Internal Server Error

An unexpected condition was encountered.

503Service Unavailable

The system is experiencing heavy load or another system failure.

 5.9.6.1.1. Request

This table shows the header parameters for the list notification types 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.9.6.1.2. Response
 

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

 5.9.6.2. Get a notification type by ID

 
MethodURIDescription
GET/notification_types/{notificationTypeId}

Returns information about the specified Notification type.

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.

500Internal Server Error

An unexpected condition was encountered.

503Service Unavailable

The system is experiencing heavy load or another system failure.

 5.9.6.2.1. Request

This table shows the header parameters for the get a notification type 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.9.6.2.2. Response
 

Example 5.29. Get notification type by ID: JSON response

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



Contents Search
loading table of contents...