How to Integrate Stackdriver with PagerDuty

Stackdriver is a SaaS monitoring solution that uses data analytics to help engineers identify and resolve critical issues with their cloud-powered applications. Stackdriver makes it easy to monitor your cloud infrastructure (AWS, Rackspace), systems (Linux, Windows), and application services (Nginx, Apache, MySQL, MongoDB, etc.).  Stackdriver has implemented two-way integration with PagerDuty, so alerts from Stackdriver can automatically trigger and resolve PagerDuty incidents. If you run into any issues in integrating Stackdriver with PagerDuty, contact our support team at support@pagerduty.com.

In PagerDuty:

  1. From the PagerDuty dashboard, click Services from the navigation bar at the top of the page.
    PagerDuty Services
  2. On the right side of the page, click the green Add New Service button.
    Add a PagerDuty Service
  3. Enter a Service-Name, select and select an escalation policy.
  4. Start typing “StackDriver” under “Integration Type” to filter your choices. Then, click the Add service button.
    StackDriver
  5. On the service page under Integration Settings, note the string next to Service API key.
    PagerDuty Service API Key

In Stackdriver:

  1. From the Stackdriver homepage, click Account in the top right and then Account Settings from the dropdown.
    Account Settings
  2. Under Settings, click PagerDuty then click +Add next to PagerDuty Services.
    PagerDuty Services
  3. Fill in Service Name with the same name you used in step 3 of the PagerDuty setup section.
  4. Fill in API Key with the Integration Service API Key that you copied from the PagerDuty service page.
    Integration Service API Key
  5. Now when you create a policy, you’ll see an option for PagerDuty in the dropdown under “notify via” in the alert section.
    Notify Via

Advanced Integration (Two-Way Sync)

Within PagerDuty

  1. To enable two-way sync with the Stackdriver service, click API Access in the navigation bar. You will need to be the account owner to have access to this section.
  2. Add a description for the key (ex. “Stackdriver Sync”), check Read-Only API Key then click Create Key.
    Add a PagerDuty API Key
  3. Note the key created and head to your Stackdriver service.
    PagerDuty API Key
  4. To set up sync, head back to your Account Settings page and click PagerDuty under Settings. Next to PagerDuty Sync API, click Configure.
    Configure
  5. Fill in API key name with name you used in step 2 of the PagerDuty Sync setup.
  6. Fill in your company subdomain name used to navigate to PagerDuty.
  7. Fill in API key with the API Access Key you copied from the PagerDuty setup section.
  8. Click Submit to finish. Now Stackdriver incidents resolved or acknowledged in PagerDuty will automatically be resolved in both applications.
    Edit PagerDuty Sync
    In addition, incidents will automatically be resolved within PagerDuty once they are resolved within Stackdriver:PagerDuty Incident

    *For documentation concerning PagerDuty authentication, click the link below.

    http://developer.pagerduty.com/documentation/rest/authentication