Support PagerDuty as a Notification Method

Registered by Roland Hochmuth

In PagerDuty you first create a service which has an service API key associated with it. See https://www.pagerduty.com/docs/guides/loggly-integration-guide/

In Monasca a new Notification Method would be supported.
    "type" would be extended to support PagerDuty. This is trivial to add. Note, we used to have "SMS", but that was taken out.
     "address" would be used to set service API key associated with the PagerDuty service that was created. This is basically copy and pasted from PagerDuty to the Monasca UI. I don't think any work is required here as the "address" fields is currently just a string.

The Notification Engine would be extended to support sending an http request to the PagerDuty API
    The PagerDuty API for creating "events" is at, http://developer.pagerduty.com/documentation/integration/events.
    The relevant "trigger" that would be created is at http://developer.pagerduty.com/documentation/integration/events/trigger.
    The file …/monasca-notification/monasca_notification/processors/notification_processor.py would be modified as follows:
        self.notification_types = {'PagerDuty': self._send_pager_duty_event}
    The method _send_pager_duty_event() is added. This method POSTs a JSON "trigger" event to the PagerDuty endpoint.
    The Trigger Events object supplies the service API key in "service_key", "event_type": "trigger" and a few more fields that are straightforward.
    The "detail" field in the notification would be filled in with other details of the Alarm, such as the Alarm ID, severity, state, … There does not appear to be any hard-coded fields to fill PagerDuty for this type of stuff.
    The Response from PagerDuty can be logged.

One thing we might want to consider adding is a "description" to the Notification Method in Monasca.

The UI would be extended to support "PagerDuty" as a "type". When the user select PagerDuty as a type it might be useful to also modify the text from "type" to "Service API Key" just to make it clearer.

I'm not sure the cli would need to be updated.

The Monasca API documentation would be updated.

Blueprint information

Status:
Complete
Approver:
Roland Hochmuth
Priority:
Medium
Drafter:
Roland Hochmuth
Direction:
Approved
Assignee:
Joe Keen
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
None
Started by
Joe Keen
Completed by
Joe Keen

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bug/pagerduty,n,z

Addressed by: https://review.openstack.org/152949
    Added the missing Pagerduty entry in the type enum for notifications

Addressed by: https://review.openstack.org/152961
    Fixed missing Pagerduty references in documentation and cli messages

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.