PagerDuty’s alerting platform allows users to centrally manage incidents with alerting, on-call scheduling, escalation policies, and incident tracking intended to increase the reliability and performance of your systems. Your LogicMonitor account comes pre-configured to integrate with your PagerDuty account. The integration enables LogicMonitor to open, update and close PagerDuty incidents and/or alerts based on LogicMonitor alerts. By sending alerts from LogicMonitor into PagerDuty, you can take advantage of PagerDuty’s alerting platform features to increase uptime of your apps, servers, websites, and databases. As with all integrations, LogicMonitor extends or provides functionality without impacting the other solutions you have implemented.
Setting Up PagerDuty Integration
You can use the LogicMonitor PagerDuty integration to create, update and close PagerDuty incidents in response to alerts triggered in your account. You’ll need to perform the following primary steps to set up PagerDuty integration.
- Obtain an integration key in your PagerDuty account that LogicMonitor can use to create, update and close incidents, as discussed next.
- Enable the PagerDuty integration in your LogicMonitor account, as discussed next.
- Configure an alert rule and escalation chain to deliver alert data to PagerDuty, as discussed next.
When a triggered alert matches the alert rule and is routed to the escalation chain with the PagerDuty integration, an incident will be created in your PagerDuty account. The ticket can then be updated and/or closed when the alert is acknowledged, escalated, de-escalated and/or cleared.
Obtaining a PagerDuty Integration Key
You will need to set up a new service in PagerDuty (Services | Add Service). As shown next, select “LogicMonitor” from the Integration Type field’s dropdown menu.
The option found under the Incident Behavior heading can be set to either Create alerts and incidents or Create incidents. To use PagerDuty’s event grouping, leave the default Create alerts and incidents option selected.
A new integration key will be generated once you add the service. You will need to save the key for later use when setting up the PagerDuty integration in your LogicMonitor account.
Enabling PagerDuty Integration in Your LogicMonitor Account
To begin configuring your PagerDuty integration in LogicMonitor, navigate to Settings | Integrations | Add | PagerDuty. As shown (and discussed) next, there are several settings that must be established in order to configure PagerDuty integration.
In the Integration Key field, enter the PagerDuty integration key retrieved in the previous section.
The HTTP Delivery section controls how LogicMonitor formats and sends the HTTP Post requests to create, update and/or close incidents. By default, LogicMonitor will pre-populate four different HTTP requests, one for each of the following alert statuses:
- New alerts (Active)
- Acknowledged alerts (Acknowledged)
- Cleared alerts (Cleared)
- Escalated alerts (Escalated)
For each request, you can select which alert statuses trigger the HTTP request. Requests are sent for new alerts (status: Active), and can also be sent for alert acknowledgements (status: Acknowledged), clears (status: Cleared) and escalations/de-escalations/adding note (status: Escalated).
Note: If the escalated status is selected and a note is added to the alert, an update request is sent whether the alert is active/cleared. If the escalated status is not selected and a note is added to the alert, a request is not sent.
You can create customized requests using the following settings:
- HTTP Method—The HTTP method for PagerDuty integrations is restricted to POST.
- URL—The URL field displays the URL that the HTTP request should be made to. This field is automatically populated based on information you provide.
Note: LogicMonitor supports all URLs from PagerDuty’s Service Regions. For more information, see PagerDuty’s Service Regions documentation.
- Alert Data—The Alert Data field displays custom formatted alert data to send in the HTTP POST request (used to create, update and close PagerDuty incidents). This text is automatically populated. You can customize the alert data field using tokens.
- Include an ID provided in HTTP response when updating alert status—This enables LogicMonitor to find the PagerDuty incident ID returned in the response to the HTTP request associated with a new alert, and then use the ID in any subsequent requests for alert acknowledgements, clears, and escalations. This option is enabled by default.
- HTTP Response Format—This is the format of the response if LogicMonitor is to use the ID provided in the response.
You can test the alert delivery with the Test Alert Delivery button. This sends a test alert and provides a response, allowing you to test whether you configured the integration correctly.
Configuring an Alert Rule and Escalation Chain
Alert rules and escalation chains are used to deliver alert data to your PagerDuty integration. When configuring these, there a few guidelines to follow to ensure incidents are opened, updated, and closed as expected within PagerDuty. For more information, see Alert Rules and Escalation Chains.
Acknowledging LogicMonitor Alerts from PagerDuty
You can acknowledge LogicMonitor alerts directly from the PagerDuty platform. To set up this functionality, you will need to establish a LogicMonitor extension (i.e. webhook) within PagerDuty using the following steps.
- In your PagerDuty account, navigate to Configuration | Services and select your LogicMonitor integration from the table of established PagerDuty service integrations.
- Once in the LogicMonitor view, open the Integrations tab.
- Click the + New Extension button located in the bottom left corner.
- One of the fields that dynamically displays upon clicking the + New Extension button requires an API token from LogicMonitor. To generate this token:
- Open LogicMonitor and find your saved PagerDuty integration (Settings | Integrations).
- Click its corresponding gear icon in order to open the Manage Integration dialog.
- At the bottom of the Manage Integration dialog, click the Generate API Token button. Copy this token to your clipboard.
- Return to PagerDuty to complete the new extension configurations:
- From the Extension Type field’s dropdown menu, select “LogicMonitor.”
- In the Name field, assign a name to the extension that clearly describes its purpose (e.g. “LogicMonitor ACK”).
- In the Details field, paste the URL value you just generated from within LogicMonitor.
- Click the Save button to complete the extension configuration and enable acknowledgement of LogicMonitor alerts directly from PagerDuty.
PagerDuty Integration Upgrades
PagerDuty V3 Webhook Subscriptions
You must modify the PagerDuty integration settings in your LogicMonitor portal to use PagerDuty’s V3 Webhook subscriptions. Use PagerDuty’s Migrating from V1/V2 Generic Extensions to V3 Webhook Subscriptions documentation along with the following procedure to upgrade your PagerDuty integration.
Requirements for PagerDuty V3 Webhook Subscriptions with LogicMonitor
To upgrade your PagerDuty integration to V3 Webhook subscriptions in your LogicMonitor portal, you need an API Access key with minimum Read-only permissions from PagerDuty. Ensure you securely store this key after you create it. For more information, see PagerDuty’s API Access Keys documentation.
Upgrading PagerDuty Integration Settings for V3 Webhook Subscriptions
- In LogicMonitor, navigate to Settings > Integrations, and select the PagerDuty instance you want to upgrade.
- Enter the API Access Key you generated from PagerDuty in the PagerDuty API Key field.
- Click Save.
The list of PagerDuty integrations is displayed.
- Re-select the PagerDuty instance you are upgrading, and click Generate API Token.
- Copy the URL from the Generate API Token dialog.
This is the Webhook URL used to create new webhooks in PagerDuty.
- In your PagerDuty instance, create a new webhook using the Webhook URL from your LogicMonitor Portal. For more information about creating webhooks, see PagerDuty’s Webhooks documentation.
Note: At this time, LogicMonitor only supports the “incident.acknowledged” event subscription.
Your PagerDuty integration in LogicMonitor upgrades after you create the webhook in your PagerDuty instance.
Important: The URL field in the HTTP Delivery settings of your PagerDuty integration reflects the URL version that HTTP requests are made to and does not reflect the version of the webhook subscription.
Update PagerDuty Service
Your previously configured PagerDuty service will continue to work without updates. However, if you would like to have the LogicMonitor integration use PagerDuty’s Event Intelligence capabilities, follow these steps in PagerDuty to update the service:
- From your PagerDuty account, navigate to to Configuration | Services.
- Click the gear icon associated with the LogicMonitor service and select “Edit Service” from the dropdown.
- Under the Incident Behavior heading, select the Create alerts and incidents option.
- Click the Save Changes button.
The following tokens are available:
- LogicModule-specific alert message tokens, as listed in Tokens Available in LogicModule Alert Messages.
- ##ADMIN##. The user the alert was escalated to.
- ##MESSAGE##. The rendered text of the alert message. This token will also pass all relevant acked information (e.g. the user that acknowledged the alert, ack comments, etc.).
- ##ALERTTYPE##. The type of alert (i.e. alert, eventAlert, batchJobAlert, hostClusterAlert, websiteAlert, agentDownAlert, agentFailoverAlert, agentFailBackAlert, alertThrottledAlert).
- ##EXTERNALTICKETID##. The PagerDuty incident ID.