Oracle Cloud Infrastructure

Oracle Cloud Infrastructure combines the elasticity and utility of public cloud with the granular control, security, and predictability of on-premises infrastructure to deliver high-performance, high-availability and cost-effective infrastructure services. Oracle Cloud Infrastructure leverages notifications, alarms, and rules to provide system-wide visibility into resource utilization. 

Requirements

  • In PagerDuty: This integration requires a Manager, Admin, Global Admin or Account owner base role to configure.
  • In Oracle Cloud Infrastructure: You are required to have authorization to work with the Notifications service, Events service and Monitoring service. You must also have permission to work in a Compartment in order to create a Topic.

 

Integration Walkthrough

In PagerDuty

1. From the Configuration menu, select Services.

2. On your Services page:

  • If you are creating a new service for your integration, click +Add New Service.
  • If you are adding your integration to an existing service, click the name of the service you want to add the integration to. Then select the Integrations tab and click the +New Integration button.

3. Type an Integration Name in the format monitoring-tool-service-name

If you are creating a new service for your integration, in Incident Settings, specify the Escalation Policy, Notification Urgency, and Incident Behavior for your new service.

4. Select your preferred endpoint type from the Integration Type menu based on the following options: 

  • Oracle Cloud Infrastructure Monitoring: If you would like messages to be published by alarm only (using the alarm message format). For this endpoint type, PagerDuty ignores any messages that use the generic message format. For example, if your event rule triggers the publication of a message to the topic containing this subscription, or if you directly publish a message to the topic using the Notifications service, then no PagerDuty incident is created. On the other hand, if your alarm triggers publication of a message to the topic, which is in the alarm message format, then a PagerDuty incident is created.
  • Custom Event Transformer: If you would like any messages to generate a PagerDuty incident, whether they come from rules, alarms, or direct publications. Messages sent to this endpoint follow the generic message format.

5. Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.

6. Copy the Integration Key and the Integration URL for your new Integration and keep it in a safe place for later use. You will be using this information when creating your subscription in Oracle Cloud Infrastructure.

 

In Oracle Cloud Infrastructure Console

To trigger a PagerDuty incident, you must publish a message to a topic containing a subscription that references your PagerDuty endpoint. There are a few options to publish messages:

  • You can directly publish a message using the Notifications service
  • Or automatically publish messages using alarms and rules. 
    • Alarms, available through the Monitoring service, automatically trigger message publication to the designated topic when out-of-bound metrics occur. You have the option of creating a topic and subscription during alarm creation. 
    • Rules, available through the Events service, automatically trigger message publication to the designated topic when an event occurs.

Test Your Subscription Using Direct Publish to Trigger a PagerDuty Incident

In this procedure, you will use the Notifications service to create a topic, add a PagerDuty subscription to the topic, confirm the new subscription, and directly publish a message. Direct publishing through the Notifications service is a good way to test your subscription.

1. Open the navigation menu. Under Solutions and Platform, go to Application Integration and click Notifications.

2. Select a Compartment you have permission to work in, and click Create Topic at the top of the topic list.

3. In the Create Topic dialog box, enter your topic name and description. Click Create.

4. Next, click the name of the new topic that you just created. On the topic detail page, click Create Subscription. In the Create Subscription dialog box, select PagerDuty, and then paste the Integration Key copied from PagerDuty in the earlier procedure. Click Create. The subscription has been created and a subscription confirmation URL is sent. The subscription remains in “Pending” status until it has been confirmed.

5. Navigate back to your PagerDuty account and locate the Confirmation URL provided in the new PagerDuty incident with the title “Oracle Notification Service Subscription Confirmation”.

6. Now that you have a topic containing a subscription that references your PagerDuty endpoint, and the subscription is confirmed, you can test the integration by directly publishing a message to this topic and it will transform into a PagerDuty incident.

To directly publish a message: 

a. Navigate back to Oracle Cloud Infrastructure. Open the navigation menu. Under Solutions and Platform, go to Application Integration and click Notifications.

b. On the Topics page, for the topic you want, click the Actions icon (three dots), and then click Publish Message.

c. In the Publish Message dialog box, enter a Message and Title.

c. Click Publish and navigate back to your PagerDuty account. You should see that a PagerDuty incident has been generated.

7. Congratulations, the integration is now complete! Now you can use your new subscription to integrate Monitoring and Events with PagerDuty. You can trigger PagerDuty incidents by publishing a message to a topic containing a subscription that references your PagerDuty endpoint.

Configure Automatic Message Publication by Rule to Trigger a PagerDuty Incident

In this procedure, you will use the Events service to create an event rule that references an existing PagerDuty subscription.

1. In Oracle Cloud Infrastructure: Open the navigation menu. Under the Solutions and Platform group, go to Application Integration and click Events Service.

2. Choose a Compartment you have permission to work in, and then click Create Rule.

3. Enter the Display Name and Description.

4. Under Event Matching, select the event you want to be notified about: Select Event Type, then select a Service Name and Event Type. For example, select Object Storage and Bucket – Create.

5. Under Actions, set up the automatic message publication to your new PagerDuty endpoint: Select Notifications for Action Type, select the Notifications Compartment, and select the Topic that contains your PagerDuty subscription.
6. Click Create Rule.

 

You have now integrated a rule in Oracle Cloud Infrastructure with PagerDuty through the rule’s reference to your PagerDuty subscription. PagerDuty incidents will be created whenever the specified event occurs in Oracle Cloud Infrastructure.

You can also set up automatic publication of messages in Oracle Cloud Infrastructure using alarms, and you can always directly publish messages from the Notifications service as well.

Configure Automatic Message Publication by Alarm to Trigger a PagerDuty Incident 

In this procedure, you will use the Monitoring service to create an alarm that references a new or existing PagerDuty subscription.

1. In Oracle Cloud Infrastructure: Open the navigation menu. Under Solutions, Platform and Edge, go to Monitoring and click Alarm Definitions.

2. Choose a Compartment you have permission to work in, and then click Create alarm.

3. Configure the metric that you want to monitor and related settings. 

4. Under Notifications, do one of the following:

a. To use an existing topic that contains a subscription to a PagerDuty endpoint, select the Topic.

b. Or, to create a new topic and subscription, click Create a topic.

i. In the Create a topic and subscription section, enter the Topic Name and Topic Description. You may want to name your topic after your PagerDuty service’s name (if the topic will only use PagerDuty subscriptions).

ii. For Subscription Protocol, select PagerDuty.

iii. For Subscription URL, in the Integration Key text box, paste the Integration Key copied from PagerDuty in the earlier procedure.

iv. Click Create topic and subscription

5. Configure repeat notifications as needed.

6. Click Save alarm. The alarm detail page is displayed for the newly created alarm. 

7. If you created a new topic and subscription, then confirm your new PagerDuty subscription: Navigate back to your PagerDuty account, and locate the Confirmation URL provided in the new PagerDuty incident with the title “Oracle Notification Service Subscription Confirmation”.

You have now integrated an alarm in Oracle Cloud Infrastructure with PagerDuty, through the alarm’s reference to your PagerDuty subscription. Now PagerDuty incidents are created whenever the specified alarm condition occurs.

You can also set up automatic publication of messages in Oracle Cloud Infrastructure using rules, and you can always directly publish messages from the Notifications service as well.

Manage Your PagerDuty Subscription

In this procedure, you will use the Notifications service to view the details of an existing PagerDuty subscription.

1. In Oracle Cloud Infrastructure: Open the navigation menu. Under Solutions and Platform, go to Application Integration and click Notifications.

2. Choose a Compartment you have permission to work in, and then click Subscriptions to display the list of subscriptions.

a. Find the subscription you want and then click the link in the Subscription OCID column to display the subscription’s details page.Review the endpoint URL and other details.
b. Example details page for a PagerDuty subscription that is pending confirmation:

 For more information about managing subscriptions and topics, see the Oracle Cloud Infrastructure documentation.

 

If you have any questions or need any assistance with this integration, please contact our Support team.

 

Start Using PagerDuty Today

Try PagerDuty free for 14 days — no credit card required.