PagerDuty Integration Walkthrough
Learn how to integrate Oracle Cloud Infrastructure Notifications with PagerDuty so you can trigger PagerDuty incidents.
Overview
Integrating with PagerDuty involves the following tasks.
Create a PagerDuty Endpoint
To complete this procedure, you must have one of the following roles in PagerDuty: Manager, Admin, Global Admin, or Account owner base role.
Create a PagerDuty Subscription
To complete this procedure, you must have access to Notifications and permissions to create topics and subscriptions. See Securing Notifications (IAM Policies).
Test a PagerDuty Subscription (Direct Publish)
To complete this procedure, you must have access to Notifications and permissions to publish messages. See Securing Notifications (IAM Policies).
Use the oci ons message publish command and required parameters to publish a message to a topic:
oci ons message publish --body <message_text> --topic-id <topic_OCID>
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Notifications.
Run the PublishMessage operation to publish a message to a topic.
Example request for a PagerDuty endpoint of the Custom Event Transformer type:
POST /20181201/topics/<topic_OCID>/messages Host: <topic API endpoint> <authorization and other headers> { "title": "Non-Optimal Alarm", "body": "Non-optimal utilization detected. An application or process may be consuming more CPU than usual." }
Trigger a PagerDuty Incident
Trigger an incident in PagerDuty from an alarm, event, connector, or announcement subscription using a subscription in Notifications.
When creating an alarm, event rule, connector, or announcement subscription, select the Notifications topic that contains the PagerDuty subscription. For instructions on creating these resources, see the following documentation.
- Creating an Alarm
- Creating an Events Rule
- Creating a Connector
- Creating an Announcement Subscription
To check the endpoint URL or other details of the PagerDuty subscription, see Getting a Subscription's Details.