How To Integrate Librato with PagerDuty

Librato is a powerful service that allows you to collect and visualize metrics for your critical IT systems.  With PagerDuty integration, you can now use Librato’s alerts to automatically trigger PagerDuty incidents so that your team can be promptly notified about potential issues with your systems.  The PagerDuty integration is quick and easy to setup, just follow this guide to get your Librato and PagerDuty accounts connected.

If you are having trouble completing the installation, please contact us.

In PagerDuty:

If you don’t already have a PagerDuty Generic API service, you should create one:

  1. In your account, under the Services tab, click “Add New Service”.
    Add a new PagerDuty service
  2. Enter a name for the service and select an escalation policy.
  3. Start typing “Librato” under “Integration Type” to filter your choices.
    Librato
  4. Click the “Add Service” button.
  5. Once the service is created, you’ll be taken to the service page. On this page, you’ll see the “Service API key”, which will be needed when you configure your Librato account to send events to PagerDuty.
    Service API Key

In Librato:

  1. Go to your Account Settings page (link at the bottom of the page).
  2. Click on the Services icon (bullhorn).
    Librato Services
  3. Click on PagerDuty.
    Add the PagerDuty integration service.
  4. Click the (+) next to Configured Services to add a service and the “New Pagerduty Service Configuration” panel will appear.
  5. Give the service a name, for example “Pagerduty Hook”.
    PagerDuty Service Configuration
    Enter the PagerDuty configuration details:

    • Service Key: The Service API Key you copied from the PagerDuty services page (REQUIRED).
    • Event Type: Set this to “trigger” (REQUIRED).
    • Description: A short description of the problem that led to this trigger. This field (or a truncated version) will be used when generating phone calls, SMS messages and alert emails. It will also appear on the incidents tables in the PagerDuty UI (REQUIRED).
    • Incident Key: Identifies the incident to which this trigger event should be applied. If there’s no open (i.e. unresolved) incident with this key, a new one will be created. If there’s already an open incident with a matching key, this event will be appended to that incident’s log. The event key provides an easy way to “de-dupe” problem reports. If this field isn’t provided, PagerDuty will automatically open a new incident with a unique key (OPTIONAL).
  6. After creating the PagerDuty service you can set up alerts. Click on the Metrics tab and select the metric you want to set the alert on. select_metric
  7. Click on the Alerts icon (bell) on the left of the page.
    Librato Alerts
  8. In the pull down menu you will find the service hook you just created. Select that service and enter a value for the Minimum and / or Maximum Threshold.
    Metric Alert Threshholds
  9. As soon as any source in the graph hits a threshold it will trigger the alert and send the payload to PagerDuty.
    PagerDuty Incident
  10. You can then view the details for the incident from the Details pane by selecting view message.
    incident_details

FAQ

How do I setup Librato to work with multiple PagerDuty services?

This is easy to do with the current integration.  Each PagerDuty service within Librato can be tied to a different service API key.  You would need to make multiple PagerDuty services within PagerDuty and Librato.

It doesn’t seem to be working. What’s going on?

Please contact us if you’re unable to sort out the difficulty.