|
| 1 | +PagerDuty Integration |
| 2 | +**************************************** |
| 3 | + |
| 4 | +PagerDuty can send both incidents and full alert-level data to Robusta for enrichment and resolution tracking. |
| 5 | + |
| 6 | +This guide explains how to set up both integrations, and how to forward alerts from sources like Alertmanager using PagerDuty AIOps Event Orchestration. |
| 7 | + |
| 8 | +After completing this tutorial, we recommend confirming that findings appear correctly in the Robusta UI timeline. |
| 9 | + |
| 10 | +Prerequisite |
| 11 | +================================= |
| 12 | +* A Robusta account with API access. |
| 13 | +* For alert-level forwarding: an AIOps-enabled PagerDuty plan. |
| 14 | +* A Robusta cluster name, as defined in your ``generated_values.yaml``. |
| 15 | + |
| 16 | +Send Incidents to Robusta |
| 17 | +============================ |
| 18 | + |
| 19 | +To send PagerDuty incidents (triggered/resolved) to Robusta: |
| 20 | + |
| 21 | +Step 1: Create a Robusta API Key |
| 22 | +--------------------------------- |
| 23 | +1. In the Robusta UI, navigate to **Settings → API Keys**. |
| 24 | +2. Click **New API Key**. |
| 25 | +3. Name the key ``PagerDuty``, grant it ``Read/Write`` access to alerts, then click **Generate API Key**. |
| 26 | +4. Copy and securely save the generated API key. |
| 27 | + |
| 28 | +Step 2: Get Your Account ID |
| 29 | +------------------------------- |
| 30 | +1. From your Robusta ``generated_values.yaml`` file, locate and copy the ``account_id``. |
| 31 | + It will look like: |
| 32 | + |
| 33 | +.. code-block:: |
| 34 | +
|
| 35 | + account_id: caa68d87-XXXX-XXXX-XXXX-a6514ccb11eb |
| 36 | +
|
| 37 | +Step 3: Create a Webhook in PagerDuty |
| 38 | +------------------------------------------- |
| 39 | +1. In PagerDuty, go to **Integrations → Generic Webhooks v3**. |
| 40 | +2. Click **New Webhook**. |
| 41 | + |
| 42 | +Step 4: Configure the Webhook |
| 43 | +---------------------------------------- |
| 44 | +Set the following values: |
| 45 | + |
| 46 | +* **Webhook URL**: |
| 47 | + |
| 48 | +.. code-block:: |
| 49 | +
|
| 50 | + https://api.robusta.dev/integrations/generic/pagerduty/incidents |
| 51 | +
|
| 52 | +* **Custom Headers**: |
| 53 | + |
| 54 | +.. code-block:: |
| 55 | +
|
| 56 | + account-id: <your_account_id> |
| 57 | + Authorization: Bearer <ROBUSTA_API_KEY> |
| 58 | +
|
| 59 | +Replace the placeholders with values from Step 1 and Step 2. |
| 60 | + |
| 61 | +Once configured, PagerDuty will begin sending incident-level data to Robusta. These will appear in the Robusta UI timeline. |
| 62 | + |
| 63 | +Send Alerts to Robusta (AIOps Plans Only) |
| 64 | +============================================== |
| 65 | + |
| 66 | +For Robusta AIOps users, you can send full alert-level data in addition to incidents. |
| 67 | + |
| 68 | +Step 1: Go to AIOps → Event Orchestration |
| 69 | +---------------------------------------------- |
| 70 | +1. In PagerDuty, go to **AIOps → Event Orchestration**. |
| 71 | +2. Click **New Orchestration** and name it ``Robusta``. |
| 72 | + |
| 73 | +Forwarding Alerts via Event Orchestration |
| 74 | +---------------------------------------------- |
| 75 | + |
| 76 | +**Recommended for Alertmanager Users** |
| 77 | + |
| 78 | +If you already use PagerDuty Event Orchestration to forward alerts from systems like Alertmanager, we recommend forwarding those alerts **directly to Robusta**. |
| 79 | + |
| 80 | +Why this matters |
| 81 | +~~~~~~~~~~~~~~~~ |
| 82 | +Robusta’s AIOps integration works best when it receives structured alert data directly. Routing alerts through intermediate services or limited integrations may strip important context. |
| 83 | + |
| 84 | +Step 1: Create an Integration for Alertmanager |
| 85 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 86 | +1. In Event Orchestration, create a new **Integration** named ``Alertmanager``. |
| 87 | +2. Use the following webhook URL: |
| 88 | + |
| 89 | +.. code-block:: |
| 90 | +
|
| 91 | + https://api.robusta.dev/integrations/generic/pagerduty/alerts |
| 92 | +
|
| 93 | +Step 2: Configure a Service Route |
| 94 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 95 | +1. At the end of your orchestration rule chain, add a **Service Route**. |
| 96 | +2. Route events with the source ``Alertmanager`` to the ``Robusta`` webhook. |
| 97 | + |
| 98 | +This ensures full alert payloads are delivered directly to Robusta. |
| 99 | + |
| 100 | +Step 2: Add a New Rule |
| 101 | +---------------------------- |
| 102 | +1. Under your ``Robusta`` orchestration, add a new rule. |
| 103 | +2. For **"When this rule is applied"**, select **Always, for all events**. |
| 104 | +3. Click **Next**. |
| 105 | + |
| 106 | +Step 3: Add a Webhook Action |
| 107 | +------------------------------- |
| 108 | +1. Under **Automation → Webhook Actions**, enable: |
| 109 | + ``Use webhooks if an event reaches this rule``. |
| 110 | + |
| 111 | +2. Configure the webhook as follows: |
| 112 | + |
| 113 | +* **Name**: ``Robusta`` |
| 114 | + |
| 115 | +* **URL**: |
| 116 | + |
| 117 | +.. code-block:: |
| 118 | +
|
| 119 | + https://api.robusta.dev/integrations/generic/pagerduty/alerts |
| 120 | +
|
| 121 | +* **Headers**: |
| 122 | + |
| 123 | +.. code-block:: |
| 124 | +
|
| 125 | + account-id: <your_account_id> |
| 126 | + Authorization: Bearer <ROBUSTA_API_KEY> |
| 127 | +
|
| 128 | +* **Body (key-value pairs)**: |
| 129 | + |
| 130 | +.. code-block:: json |
| 131 | +
|
| 132 | + { |
| 133 | + "custom_details": "{{event.custom_details}}", |
| 134 | + "summary": "{{event.summary}}", |
| 135 | + "source": "{{event.source}}", |
| 136 | + "dedup_key": "{{event.dedup_key}}", |
| 137 | + "severity": "{{event.severity}}" |
| 138 | + } |
| 139 | +
|
| 140 | +3. Click **Save**. |
| 141 | + |
| 142 | +Step 4: Route Matching |
| 143 | +--------------------------- |
| 144 | +In the routing configuration, route it to the the service of your choice or you can do it dynamically by setting the route to: |
| 145 | + |
| 146 | +.. code-block:: |
| 147 | +
|
| 148 | + event.source |
| 149 | +
|
| 150 | +Using this regular expression: |
| 151 | + |
| 152 | +.. code-block:: |
| 153 | +
|
| 154 | + .* |
| 155 | +
|
| 156 | +This ensures all alert sources are routed properly to their Pagerduty Services. |
| 157 | + |
| 158 | +Verify it Works |
| 159 | +============================= |
| 160 | + |
| 161 | +To confirm the integration: |
| 162 | + |
| 163 | +* Trigger an alert from Alertmanager, Nagios, or another connected system. |
| 164 | +* Check that the alert appears in the Robusta UI timeline under the correct cluster. |
| 165 | +* Confirm the incident is routed to the correct Service in Pagerduty. |
| 166 | + |
| 167 | +Optional: Cluster Name via Query Param |
| 168 | +============================================ |
| 169 | + |
| 170 | +You can specify the target cluster using a query parameter in the webhook URL: |
| 171 | + |
| 172 | +.. code-block:: |
| 173 | +
|
| 174 | + https://api.robusta.dev/integrations/generic/pagerduty/incidents?cluster=your-cluster-name |
| 175 | +
|
| 176 | +This is useful for multi-cluster setups where Robusta should assign findings to a specific cluster. |
| 177 | + |
| 178 | +For example: |
| 179 | + |
| 180 | +.. code-block:: |
| 181 | +
|
| 182 | + https://api.robusta.dev/integrations/generic/pagerduty/incidents?cluster=test-cluster |
| 183 | +
|
| 184 | +This will create findings in ``test-cluster``. |
0 commit comments