# Integration Guide: PagerDuty *Version: 1.0| Last Updated: 2025-02-25* ## Overview - **Integration Name:** PagerDuty - **Purpose:** Integrate PagerDuty with MoovingON AI, enabling users to send PagerDuty notifications - **Audience:** Support team, TAM - **Prerequisites:** - A valid Splunk account - MoovingON AI account access with integration permissions --- ## Table of Contents - [[#Setup Instructions]] - [[#Configuration]] - [[#Testing the Integration]] - [[#FAQs]] - [[#Related Links]] --- ## Setup Instructions A webhook should be created in the MoovingON AI platform to send alerts to PagerDuty. 1. **Step 1:** Webhook should be created in settings **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdWIaDgtaHt_x9LgIvPW85Ea7tLRUT0p3ceSGLJrK-nVjbueBtE0IBzc237VIA7j71kB_JKCz6aqBUGUBV0QL04N4rWv6nzCTAmebl0vn1q4NFYsvjybjLIutUU6zs2OS-SNiHfcA?key=KBEKAuRqwRONFDBsNTxVIo1q)** 2. **Step 2:** Click on the **Plus** symbol in the upper bar: **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdm_c8HZMD4fCX5SNBIbRbfcW7z8urvUXiHIdNtRulWSFYaRrbmnevTX9AzjHHNqoGgH4hx6XabNBXLDMzURWK_XUU6j38yvaOsi2UJsMrSHI9Dz4Svcya-D2PwaQYBC-wIIWK0?key=KBEKAuRqwRONFDBsNTxVIo1q)** 3. **Step 3:** On the right side of the screen, a window will appear to create the webhook. The parameters: - **Name**: Webhook's name - **Method**: POST - **Content-Type**: JSON - **URL**: This is the URL used to open the alert in OpsGenie "https://api.pagerduty.com/incidents" - **Payload**: Creating an incident can be tested and configured in this [link](https://developer.pagerduty.com/api-reference/a7d81b0e9200f-create-an-incident) Here is an example payload, which was used in the screenshot: { "incident": { "type": "incident", "title": "The server is on fire.", "service": { "id": "{SERVICE_ID}", "type": "service_reference" }, "priority": { "id": "{PRIORITY_ID}", "type": "priority_reference" }, "urgency": "high", "incident_key": "baf7cf21b1da41b4b0221008339ff357", "body": { "type": "incident_body", "details": "TestDocumentation" }, "escalation_policy": { "id": "{ESCALATION_POLICY_ID}", "type": "escalation_policy_reference" } } } ###### Note: ID's extraction can be found in [[#Configuration]] - Headers should be added by clicking "**Add Header**.": 1. Accept*: application/vnd.pagerduty+json;version=2 2. Content-Type*: application/json 3. From: [email protected] 4. Authorization: Token token={TOKEN} **NOTE**: values inside curly brackets should be inserted with the relevant values **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfUE_c4TVj2PVjEBOzVMjUOe1zdEwnoiY-NTwv2yKshk922-zB5FiJ0xx9YjBybP11qBgzRtVb1dKG0JDR3ATY1VO1mhHvXoul41XZT7R8qtmYk_CU54IabEusfsalKcT7Q70Lo?key=KBEKAuRqwRONFDBsNTxVIo1q)** --- ## Configuration Generate token (as stated in the [documentation](https://support.pagerduty.com/main/docs/api-access-keys#section-generating-a-general-access-rest-api-key)): 1. In the web app, navigate to **User Icon**  , **My Profile**  , **User Settings**. 2. In the section **API Access**, click **Create API User Token**. 3. Enter a **Description** to help you identify the key later. 4. Click **Create Key**. This will generate a unique API key. Store it in a secure location, as this is the only time the key is displayed in full. If you lose a key, you will need to delete it and create a new one. 5. Click **Close**. To get the ID of relevant fields: 6. **Service ID**: To get the ID, first, we have to create the service in the PagerDuty UI. Afterward, entering the Service page, we can see the ID in the URL. For example: **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXd40r2G0QQRuzptZqzx-vpD1eSNdc1M4f-ZqXKigVWO0Jw4CJYqoKo6zYOsW8UZhqS4jFm6rzK3r02leHhNYSFzkSx33SreRY7QLDI3CLtwqbbId1wQJO25DPoYBVMQ_0s8_NF9?key=KBEKAuRqwRONFDBsNTxVIo1q)** **The same procedure applies to Escalation policies** 2. **Priority ID**: To get the priority IDs, we have to run this API: curl --request 'GET' \ --url 'https://api.pagerduty.com/priorities' \ --header 'Authorization: Token token=YOUR_PAGERDUTY_API_KEY' \ --header 'Accept: application/vnd.pagerduty+json;version=2' Demonstration of response: { "priorities": [ { "id": "P1", "type": "priority", "summary": "Critical" }, { "id": "P2", "type": "priority", "summary": "High" }, { "id": "P3", "type": "priority", "summary": "Medium" }, { "id": "P4", "type": "priority", "summary": "Low" } ] } --- ## Testing the Integration - **Test Case:** By running the webhook on alert, we receive this response: **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXc3yd4W5yexQjXvsKz98eHfwV_v_F3uX56vzOabXKKRTZM7-HwCj706lYJUgi9ppzO6wWVl889y7Os3H30oOKts2fcDnSpv_f8yuzZ5AUtuMnIVQbdy_IQRkZ5sdtymbWa0yJ9prQ?key=KBEKAuRqwRONFDBsNTxVIo1q)** We can see that it's received in PagerDuty as well: ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcoN14jB_mMaE7ziRj3Z4MC0xgQ6dX-qpsbOTgYh3LJ-h-zSZLaEGC7NqcBj9e9uPllUOdQrX7D-OC3Gx295Qoe_bzDVSZMfEQTgKkcUvhOZJfYkPKSAPh_SBdUlqRIEDjrwaeavQ?key=KBEKAuRqwRONFDBsNTxVIo1q) --- ## FAQs - **Q:** How to extract a **Token**, **Service ID** or **Priority ID**? **A:** It's explained in the [[#Configuration]] section --- ## Related Links - **External Resources:** [Create an Incident](https://developer.pagerduty.com/api-reference/a7d81b0e9200f-create-an-incident) , [Services and Integrations](https://support.pagerduty.com/main/docs/services-and-integrations#section-events-API-v2) , [Incident Priority](https://support.pagerduty.com/main/docs/incident-priority#configure-incident-priority) , [API Keys](https://support.pagerduty.com/main/docs/api-access-keys#section-generating-a-general-access-rest-api-key) ,