> For the complete documentation index, see [llms.txt](https://oiadocs.cloudfabrix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oiadocs.cloudfabrix.io/integrations-guide/integrations/pagerduty.md).

# PagerDuty

## Introduction&#x20;

[PagerDuty](https://www.pagerduty.com/) is a leader in IT Incident Response, offering cloud based solution for incident management and on-call routing. This section explains on how to integrate CloudFabrix AIOps with PagerDuty.&#x20;

This integration offers bi-directional integration between CloudFabrix AIOps and PagerDuty.&#x20;

**Integration Highlights:**&#x20;

* Creates Incidents in PagerDuty for every Actionable Incident created in CFX AIOps
* Updates performed in PagerDuty by On-Call team are reflected back in CFX AIOps&#x20;
  * (Ex: priority/urgency changes, ticket assignment, notes updates etc.)
* Similarly, Incident updates done in CFX AIOps are reflected in PagerDuty
* From CFX AIOps, diagnostic results and comments can be shared to PagerDuty Incident&#x20;
* Once Incident is resolved by PagerDuty on-call team, the incident on CFX platform will  also be marked as resolved.

## Prerequisites

## Enabling API access on PagerDuty&#x20;

#### Step1: Get Event API Token

1.Login to PagerDuty as the Administrator / Account owner. Navigate to Integrations under Configuration-> Service-> Integrations.

![](/files/-MJC2njML6jX_Ew6NRCO)

![](/files/-MJC2QgJEISUsiZvEu_F)

2\. Rest API Key

To retrieve API key, login as PagerDuty administrator / Account owner. Navigate to Configuration->API Access.

![](/files/-MK6NYQMu0GD58Ipi8mX)

3\. Enter Description and click on 'Create Key.

![](/files/-MK6NoL_3GvSj5efN26c)

#### Step 2: Setting up the Service

1.Login as PagerDuty Administrator / Account owner. Navigate to Configuration and Services.

![](/files/-MK6OFpWHHxRmTr7LG1j)

#### Step 3: Set up Escalation policy

1.Login as PagerDuty Administrator / Account Owner. Navigate to Configuration and Escalation Policies.

![](/files/-MK6OTjONajE48iFMMjU)

![](/files/-MK6Oh2CUFUsllhbcWIu)

#### Step 4: Add Team Members

1.Login as PagerDuty Administrator / Account Owner. Navigate to Configuration and Teams.

![](/files/-MK6PBIvC_GipL8hZEvw)

2\. Add User(s)

![](/files/-MK6PMbWJYGNSDHLQfhi)

#### Step 5: Setup Webhook

1.Login as PagerDuty Administrator / Account owner and navigate to Configuration-> Services-> Integrations.

![](/files/-MK6P_igc4QSwek7kwlg)

![](/files/-MK6PwJYxRpSTzOUR8qn)

## Adding PagerDuty as DataSource

**Step 1**: Login to cfxDimensions through web browser UI and login to cfxOIA application. Select the project and on context menu 'Configure Project'

**Step 2**: Select 'DataSources' from left navigation tabs and click on '+' to add new data source as shown below.

![Click on '+' to add new data source](/files/-MJV5gkWZlEJfXS6POKG)

**Step 3**: New DataSource Add screen is displayed. Enter Datasource Name, Datasource Description, If Gateway access is required and select DataSource Type 'PagerDuty' from the displayed datasources as shown below.

![](/files/-MJV6E9r7BKmStYlMAK_)

**Step 4**: The view expands to capture information related to PagerDuty as shown below.

![](/files/-MJV6oBYnRg1ny0bsKLZ)

**Step 5**: Fill in the details and click on '***Test Connectivity***' to ensure the entered details are correct. Click on 'Save'.

A sample PagerDuty details are as shown below.

![Sample PagerDuty Details](/files/-MJV7mh2F3Lal8vt59Ti)

## Adding Team(s) to PagerDuty

**Step 1**: Login to cfxDimensions and select cfxOIA application. Select Project -> Configure Project. Select '**Teams**' on left side tab menu and click on **'+**' as shown below.

![Click on '+' to crate new team](/files/-MJV9BbUTWo-epUXhIpd)

**Step 2:** The following view is displayed. Select Team Name 'PagerDuty'

![](/files/-MJV9X0Q-Xh465NQfSfc)

**Step 3**: The following view is displayed. Enter Team Name, Description and select PagerDuty.

![](/files/-MJVqZXi5CVvwKl6Ogom)

![](/files/-MJVt1BIINMtD0HOe-It)

{% hint style="info" %}
Enabling Auto Share allows to automatically send updates to PagerDuty whenever there is an update in cfxOIA incident.
{% endhint %}

Click **Finish.**

## EndPoints Configuration (PagerDuty to cfxOIA)

**Step 1**: Webhook is commonly used endpoint. The webhook URL generated in cfxOIA is used to configure the webhook on PagerDuty.

**Step 2**: Login into cfxDimensions and select cfxOIA app. Open the project in edit configuration mode. Select 'Incidents' on left menu, on Incident Endpoints, click on '**+**' as shown below.

![](/files/-MJVwg6YCGTVmmvBTOXW)

**Step 3**: Select Endpoint role as '**Source**' or '**Target**', select Event Type (ex: OIA Incident).

![](/files/-MJVxOwZmtfff83sgKTp)

**Step 4:** Select 'EndPoint Type' as shown below.

![](/files/-MJVxuQqfJELdMahGSxR)

Depending on the endpoint type selected, the view changes to capture corresponding information as shown below.

![](/files/-MJVyVUoRtSg2NABfbO6)

**Step 5**: Click Save. &#x20;

**Step 6**: From initial 'Incidents End Point view', you can access webhooks on the context menu of each end point as shown below.

![](/files/-MJW-Sn94BkwchMymrsV)

**Step 7**: The following image shows sample Endpoints for CloudFabrix to PagerDuty (Target) .

![](/files/-MK6RS4pTThX9y6rBups)

**Step 8**: The following shows sample endpoint from PagerDuty to CloudFabrix OIA (Source)

![](/files/-MK6RfX_ldezp7a-filt)

**Step 9**: Create Mappings between Source and Target Endpoints. click on '**+**' on 'Incident Mappings' tab as shown below.

![](/files/-MJW2rrhPT37tY0jDhrd)

**Step 10**: The following mapping view is displayed.  The information is captured in stepped views as shown from Selecting endpoints, mapper, pipeline, script before confirmation.&#x20;

In first step select source and target endpoints, click Next.

![](/files/-MK6RsTbJxT82X9rKciQ)

**Step 11**: Select Mapper and Click Next

![](/files/-MJWDVi7G-GgGGbCD8CG)

**Step 12**:  Select Pipeline and click Next

![](/files/-MJWDkifPzsr0mmVBve9)

**Step 13**: Update scrips either in JSON or Python format and click Test the script before clicking Next

![](/files/-MJWE9gjFAepb1V32y4P)

Step 14: Confirm the entries on the 'Confirm' step and click '**Finish**' as shown.

{% hint style="info" %}
CloudFabrix's default script provides basic handling. However, users can modify the script to provide custom handler by updating the script here. Ensure to test the script after modification.
{% endhint %}

![](/files/-MJWEPvvF452O3MfEwcM)

**Step 15**:  Once mappings are completed, the Incidents Mappings are displayed. The newly created mapping needs to be 'Enabled' by clicking 'Enable' on context menu of the mapping. The Enable/Disable gets toggled to activate or deactivate the mapping.

![](/files/-MJWF0Nn_PH9uq0ZRfsh)

## Contacting Support

Support queries related to this integration can be sent to <support@cloudfabrix.com>
