|
1 | 1 | # PagerDuty + Prefect |
2 | 2 |
|
3 | | -## Integration Benefits |
| 3 | +Using the PagerDuty integration with Prefect, you can receive PagerDuty alerts based on events raised by your flow runs and agents. |
4 | 4 |
|
5 | | -* Notify on-call responders based on Prefect automation rules.*** |
6 | | -* Send event data from Prefect with links to the flow run and agents that triggered the event.*** |
7 | | -* Create high and low urgency incidents based on the severity of the event from the Prefect event payload.*** |
8 | | -* Depending on your preference, either create multiple integrations in a PagerDuty Service for corresponding Prefect flows |
9 | | - and agents or reuse an integration key to create multiple actions that can be used by many automation rules in Prefect*** |
| 5 | +## Integration benefits |
10 | 6 |
|
11 | | -## How it Works |
| 7 | +* Notify on-call responders based on Prefect automation rules. |
| 8 | +* Send event data from Prefect with links to the flow run and Agent that triggered the event. |
| 9 | +* Create high- and low-urgency incidents based on the severity of the event from the Prefect event payload. |
| 10 | +* Create multiple integrations in a PagerDuty service for corresponding Prefect flows and agents. |
| 11 | +* Use a single integration key to create multiple actions that can be used by many automation rules in Prefect. |
12 | 12 |
|
13 | | -Prefect users can define [automations](concepts/automations.html) for flow runs and agents and then be alerted in PagerDuty. Automations can be set up to notify about flow run state changes, SLAs on scheduled flow runs and the health of agents. With the |
14 | | -PagerDuty + Prefect integration you can set up an action(s) for one or more PagerDuty integration keys and then assign those actions to the automations. If a Prefect automation is triggered, Prefect will send an alert to the users incident queue in PagerDuty |
15 | | -to be actioned as a typical PagerDuty alert. |
| 13 | +## How it works |
| 14 | + |
| 15 | +You can define [automations](/orchestration/concepts/automations.html) for flow runs and agents, then be alerted in PagerDuty. Automations can be set up to notify about flow run state changes, SLAs on scheduled flow runs, and the health of agents. |
| 16 | + |
| 17 | +With the PagerDuty + Prefect integration you can set up actions for one or more PagerDuty integration keys, then assign those actions to the automations. If a Prefect automation is triggered, Prefect sends an alert to the incident queue in PagerDuty. |
16 | 18 |
|
17 | 19 | ## Requirements |
18 | 20 |
|
19 | | -The user can create or delete an action with the [User level](rbac/overview.html) role. |
| 21 | +The PagerDuty integration requires Prefect automations, which are supported in [Prefect Cloud plans](https://www.prefect.io/pricing/). |
| 22 | + |
| 23 | +Teams using [Role Based Access Controls (RBAC)](/orchestration/rbac/overview.html) need to set appropriate User level permissions to create, update, and delete automations. |
20 | 24 |
|
21 | 25 | ## Support |
22 | 26 |
|
23 | | -If you need help with this integration, please contact ***[email protected]***. |
| 27 | +If you need help with this integration, we have a public [Slack ](https://prefect.io/slack) for chatting about Prefect, asking questions, and sharing tips, or contact us directly at _[email protected]_. |
| 28 | + |
| 29 | +## Setup and configuration |
24 | 30 |
|
25 | | -## Integration Walkthrough |
| 31 | +Follow these steps to set up the PagerDuty + Prefect integration. |
| 32 | + |
| 33 | +Note that you should have PagerDuty and Prefect Cloud accounts created before starting the integration. |
26 | 34 |
|
27 | 35 | ### In PagerDuty |
28 | 36 |
|
29 | | -**Integrating With a PagerDuty Service** |
30 | | -1. From the **Configuration** menu, select **Services**. |
31 | | -2. There are two ways to add an integration to a service: |
32 | | - * **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. |
33 | | - * **If you are creating a new service for your integration**: Please read our documentation in section [Configuring Services and Integrations](https://support.pagerduty.com/docs/services-and-integrations#section-configuring-services-and-integrations) and follow the steps outlined in the [Create a New Service](https://support.pagerduty.com/docs/services-and-integrations#section-create-a-new-service) section, selecting ***PREFECT*** as the **Integration Type** in step 4. Continue with the In ***PREFECT*** section (below) once you have finished these steps. |
34 | | -3. Enter an **Integration Name** in the format `monitoring-tool-service-name` (e.g. ***PREFECT-FLOW-AUTOMATION-EXAMPLE***) and select ***PREFECT*** from the Integration Type menu. |
35 | | -4. Click the **Add Integration** button to save your new integration. You will be redirected to Prefect to create an action. |
| 37 | +First, make sure you have a configured PagerDuty service to connect with Prefect. From the **Configuration** menu in PagerDuty, select **Services**. |
| 38 | + |
| 39 | +There are two ways to add an integration to a PagerDuty service: |
| 40 | + |
| 41 | +* **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. |
| 42 | +* **If you are creating a new service for your integration**: Please read the PagerDuty documentation [Configuring Services and Integrations](https://support.pagerduty.com/docs/services-and-integrations#section-configuring-services-and-integrations) and follow the steps outlined in the [Create a New Service](https://support.pagerduty.com/docs/services-and-integrations#section-create-a-new-service) section, selecting **Prefect Cloud** as the **Integration Type** in step 4. Continue with the [In Prefect](#in-prefect) section below once you have finished these steps. |
| 43 | + |
| 44 | +Enter an **Integration Name** in the format `monitoring-tool-service-name` (for example, "PREFECT-FLOW-AUTOMATION-EXAMPLE") and select **Prefect Cloud** from the **Integration Type** menu. |
| 45 | + |
| 46 | +Click the **Add Integration** button to save your new integration. You will be redirected to Prefect to create an action. |
36 | 47 |
|
37 | 48 | ### In Prefect |
38 | 49 |
|
39 | | -To get started and set up an integration in Pager Duty, click the following button: |
| 50 | +Once you have set up the PagerDuty service, click the following button or [use this link](https://app.pagerduty.com/install/integration?app_id=PC2USS4&redirect_url=https://cloud.prefect.io/pagerduty&version=2) to configure the integration: |
40 | 51 |
|
41 | 52 | [<img src="/logos/pagerduty_green.png" height=62 width=300 style="max-height: 80px; max-width: 400px;">](https://app.pagerduty.com/install/integration?app_id=PC2USS4&redirect_url=https://cloud.prefect.io/pagerduty&version=2) |
42 | 53 |
|
43 | | -After following the PagerDuty steps, you will be redirected to Prefect. The integration keys, with their corresponding PagerDuty Service names, will be auto-populated for you to save as an action. You then have the option to |
44 | | -change the severity for each of these actions. Once saved, the actions can then be used by an automation. You also have the option to add additional rows so that you can pre-configure actions with different severity levels on |
45 | | -the same integration key to be used by different automation rules. |
| 54 | +Log into your PagerDuty account and follow the PagerDuty steps, which include selecting the PagerDuty service. |
| 55 | + |
| 56 | +You will be redirected to Prefect Cloud. The PagerDuty integration keys, with their corresponding PagerDuty service names, will be auto-populated for you in Prefect Cloud to save as an action. You can change the severity for each of these actions. |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +Once saved, the actions can then be used by an [automation](/orchestration/concepts/automations.html). You also have the option to add additional rows so that you can pre-configure actions with different severity levels on the same integration key to be used by different automation rules. |
| 61 | + |
| 62 | +## Test PagerDuty actions |
| 63 | + |
| 64 | +Follow these steps to test a PagerDuty integration action: |
46 | 65 |
|
47 | | -## How to Test the Action |
| 66 | +1. In Prefect Cloud, navigate to **Team > Automation Actions**. |
| 67 | +2. Test the action from this screen by clicking the **Test Action** (debug) button. |
48 | 68 |
|
49 | | -1. In Prefect, navigate to Team > Automation Actions |
50 | | -2. Test the action from this screen with the debug icon |
| 69 | +## Uninstall the PagerDuty integration |
51 | 70 |
|
52 | | -## How to Uninstall |
| 71 | +Follow these steps to remove the PagerDuty integration: |
53 | 72 |
|
54 | | -1. In Prefect, navigate to Team > Automation Actions |
55 | | -2. Delete the action from this screen with the trash icon |
| 73 | +1. In Prefect Cloud, navigate to **Team > Automation Actions**. |
| 74 | +2. Delete the action by clicking the **Delete Action** (trash icon) button. |
0 commit comments