PagerdutyHook

PagerDuty

The PagerdutyHook can be used to interact with both the PagerDuty API and the PagerDuty Events API.

View on GitHub

Last Updated: Oct. 26, 2022

Access Instructions

Install the PagerDuty provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

tokenPagerDuty API token
pagerduty_conn_idconnection that has PagerDuty API token in the password field

Documentation

The PagerdutyHook can be used to interact with both the PagerDuty API and the PagerDuty Events API.

Takes both PagerDuty API token directly and connection that has PagerDuty API token. If both supplied, PagerDuty API token will be used. In these cases, the PagerDuty API token refers to an account token: https://support.pagerduty.com/docs/generating-api-keys#generating-a-general-access-rest-api-key https://support.pagerduty.com/docs/generating-api-keys#generating-a-personal-rest-api-key

In order to send events (with the Pagerduty Events API), you will also need to specify the routing_key (or Integration key) in the extra field

Was this page helpful?