Menu
DocumentationPluginsPagerDuty data source for Grafana
Enterprise

PagerDuty Grafana data source

Note

This plugin is in a preview phase

The PagerDuty data source plugin allows you to query incidents data or visualize incidents using annotations.

Requirements

This plugin has the following requirements:

Install the plugin

To install the data source, refer to Installation.

Configure the data source in Grafana

Add a data source by filling in the following fields:

Authentication fields

This plugin supports API key based authentication. Visit the REST API Keys documentation for more information on how to generate an API key. As plugin only reads data from PagerDuty prefer generating read-only API Key.

FieldDescription
API KeyEnter your PagerDuty REST API Key

Configure the data source with provisioning

It is possible to configure data sources using configuration files with Grafana’s provisioning system. To read about how it works, including all the settings that you can set for this data source, refer to Provisioning Grafana data sources

Here are some provisioning examples for this data source using API Key authentication:

yaml
apiVersion: 1
datasources:
  - name: PagerDuty
    type: grafana-pagerduty-datasource
    jsonData:
      auth:
        id: api_key
    secureJsonData:
      auth.api_key.apiKey: <API_KEY>

Query the data source

Query builder

At the moment plugin supports only querying incidents. There are 2 actions available: “List incidents” and “Get and incident”.

When listing all incidents by default the query uses ${__from:date} and ${__to:date} for Since and Until parameters, fetching only incidents created in the dashboard’s selected time frame. If you want to query all incidents, clear out Since and Until parameters. You can also provide additional parameters, such as incident urgencies or statuses, service ids, team ids, etc.

When querying data for the single incident you will need to fill in the incident id.

You can also filter fields being returned by selecting them under “Select fields” select box.

Annotations

You can use annotations to visualize the relation between incidents and other data on your dashboards. For a generic information on how to use annotations refer to the documentation.

Templates and variables

To add a new PagerDuty query variable, refer to Add a query variable. Use your PagerDuty data source as your data source and fill out the fields in the query builder.

Note: When creating PagerDuty query variable, first two selected fields under “Select fields” will be used as variable label and value respectively. If only one field is selected it will be used for both variable label and value. For example, if you want to create a variable that holds incident id, you can select title and id under “Select fields”, so that incident title is used as a human readable label and incident id is used as a value.

After creating a variable, you can use it in your PagerDuty queries using Variable syntax. For more information about variables, refer to Templates and variables.

Learn more