Harness Integration Guide

PagerDuty + Harness Integration Benefits

  • Notify on-call responders based on conditions created in Harness workflow notification settings.
  • Send enriched event data from Harness, including the specific failures of a deployment.
  • Create high and low urgency incidents based on the severity of the event from the Harness event payload.
  • Notify multiple teams to address a failed deployment.

How it Works

  • Harness deployments use the workflow notification strategy feature to send notifications to user groups and various notification channels.
  • When the condition of a notification strategy is met, it will send an event to PagerDuty. Events from Harness will trigger a new incident on the corresponding PagerDuty service, or group as alerts into an existing incident.

Requirements

  • PagerDuty integrations require a Manager role for the services that Harness should be trigger incidents on or the role of a Admin if you are using Global Event Rules. If you do not have this role, please reach out to an Admin or Account Owner within your organization to configure the integration.

Integration Walkthrough

In PagerDuty

There are two ways that Harness can be integrated with PagerDuty: via Global Event Routing or through an integration on a PagerDuty Service.

If you are adding Harness to an existing PagerDuty service, please skip to the Integrating with a PagerDuty Service section of this guide.

Integrating With Global Event Routing

Integrating with Global Event Routing enables you to route events to specific services based on the payload of the event from Harness. If you would like to learn more, please visit our article on Global Event Routing.

1. From the Configuration menu, select Event Rules.

2. On the Event Rules screen, click on the arrow next to Incoming Event Source to display the Integration key information. Copy your Integration Key. This is the same integration key you will use for any other tool you want to integrate with using event rules. When you have finished setting up the integration in Harness, you will return to this interface to specify how to route events from Harness to services in PagerDuty.

Keep this key in a safe place for later use. You can now proceed to the In Harness section below.

Note:  If your team has already integrated using event rules, you can verify by looking up the PagerDuty Event Rules Integration Key within any User Groups that could have the PagerDuty Integration Key inputted. You can then use the existing User Group (if applicable) and pipe Harness events into your service by writing new event rules for your service.

Integrating With a PagerDuty Service

Integrating with a PagerDuty service directly can be beneficial if you don’t need to route alerts from Harness to different responders based on the event payload. You can still use service-level event rules to perform actions such as suppressing non actionable alerts and adjusting the severity.

1. From the Configuration menu, select Services.

2. 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.

If you are creating a new service for your integration, please read our documentation in section Configuring Services and Integrations and follow the steps outlined in the Create a New Service section, selecting Harness  as the Integration Type in step 4. Continue with the In Harness section (below) once you have finished these steps.

3. Enter an Integration Name in the format `monitoring-tool-service-name` (e.g. Harness-Shopping-Cart) and select Harness from the Integration Type menu.

4. Click Add Integration button to save your new integration. You will be redirected to the Integrations tab for your service.

5. An Integration Key will be generated on this screen. Keep this key saved in a safe place, as it will be used when you configure the integration with Harness in the next section.

In Harness

1. In your Harness account, locate an existing Deployment Workflow and select the down arrow to open the notification strategy screen.

2. Click the + Add Notification Strategy button. Select the workflow Condition(s) that should be met to generate PagerDuty notifications and input the User Group(s) that you want to associate with the PagerDuty integration. Click Submit.

3. Next, navigate to the menu bar, click Continuous Security and select Access Management.

4. Under User Groups, locate the inputted user group that is tied to the Workflow. Under said user group, edit the Notification Settings and input your token (from the In PagerDuty steps) under PagerDuty Integration Key. Select Submit.

5. If a user is on-call for the PagerDuty service associated with this integration key, an incident should be triggered with the title “Test ticket to validate new key”.

Note: When using a Global Event integration key, verify that the corresponding event is found in the alert page. It is unlikely that this test event meets conditions to trigger an incident. If an incident is not triggered for a service integration key, verify that the service has a user on-call.

 

FAQs

Is it possible to have a Harness integration route alerts to multiple services?

Yes. You have two options: Integrating with Global Event Routing which would allow you to route one incident to a specific incident based on conditions set in PagerDuty, or adding individual service integration keys per desired service to the configuration. You can add a new user group to a workflow for every PagerDuty service integration key where you want the same event to be sent.

Can I resolve the PagerDuty incident once the workflow sends a successful deploy?

This is not possible at this time.