Pagerduty Triggering Output and Integration

George Alpizar
George Alpizar
  • Updated

Overview

This output type sends notifications and alerts to a specified Pagerduty API endpoint.


Review Sample Configuration

The following sample configuration displays an output without the name of the organization-level integration:

    - name: pagerduty-integration
      type: pagerduty
      endpoint: https://api.pagerduty.com/incidents
      custom_headers:
        Accept: "application/vnd.pagerduty+json;version=2"
        Content-Type: "application/json"
        Authorization: "Token token=XXXXXXXXXX"
        From: "user@edgedelta.com" 
      notify_content:
        advanced_content: |
          {
            "incident": {
              "type": "incident",
              "title": "{{.Tag}} {{.Host}} Disk usage at 85%",
              "service": {
                "id": "",
                "type": "service_reference"
              },
              "body": {
                "type": "incident_body",
                "details": "A disk is getting full on this machine. You should investigate what is causing the disk to fill, and ensure that there is an automated process in place for ensuring data is rotated (eg. logs should have logrotate around them). If data is expected to stay on this disk forever, you should start planning to scale up to a larger disk."
              }
            }
          }

Review Parameters

Review the following parameters that you can configure in the Edge Delta App.


name

Required

Enter a descriptive name for the output or integration.

For outputs, this name will be used to map this destination to a workflow.

Review the following example: 

name: pagerduty-integration

integration_name

Optional

This parameter refers to the organization-level integration created in the Integrations page. 

If you need to add multiple instances of the same integration into the config, then you can add a custom name to each instance via the name parameter. In this situation, the name should be used to refer to the specific instance of the destination in the workflows.

Review the following example: 

integration_name: ed-alert-pagerduty

type

Required

Enter pagerduty.

Review the following example: 

type: pagerduty

endpoint

Required

Enter the Pagerduty API endpoint URL.

Review the following example: 

endpoint: https://api.pagerduty.com/incidents

custom_headers and custom_fields

Optional

This parameter is used to customize the notification content.

If you do not want to use default fields in a notification, then you can create custom headers and fields.

To learn more, see Review Notify Content Parameters.

Review the following example: 

custom_headers: 
Accept: "application/vnd.pagerduty+json;version=2"
Content-Type: "application/json"
Authorization: "Token token=XXXXXXXXXX"
From: "user@edgedelta.com"

notify_content: advanced_content

Optional

A payload is JSON object that is used to define metadata about the message.

You are responsible for ensuring the validity of the JSON object. 

Additionally, configurations you make in this parameter will override all other configurations, including custom_fields, title, and disable_default_fields.

Review the following example: 

{
    "incident": {
        "body": {
            "details": "",
            "type": "incident_body"
        },
        "service": {
            "id": "",
            "type": "service_reference"
        },
        "title": "{{ .Title }}",
        "type": "incident"
    }
}

 


 

Share this document