airflow.providers.pagerduty.notifications.pagerduty

Module Contents

Classes

PagerdutyNotifier

Pagerduty BaseNotifier.

Attributes

send_pagerduty_notification

class airflow.providers.pagerduty.notifications.pagerduty.PagerdutyNotifier(*, summary, severity, source='airflow', action='trigger', dedup_key=None, custom_details=None, group=None, component=None, class_type=None, images=None, links=None, pagerduty_events_conn_id='pagerduty_events_default', integration_key=None)[source]

Bases: airflow.notifications.basenotifier.BaseNotifier

Pagerduty BaseNotifier.

Parameters
  • summary (str) – Summary for the event

  • severity (str) – Severity for the event, needs to be one of: info, warning, error, critical

  • source (str) – Specific human-readable unique identifier, such as a hostname, for the system having the problem.

  • action (str) – Event action, needs to be one of: trigger, acknowledge, resolve. Default to trigger if not specified.

  • dedup_key (str | None) – A string which identifies the alert triggered for the given event. Required for the actions acknowledge and resolve.

  • custom_details (Any | None) – Free-form details from the event. Can be a dictionary or a string. If a dictionary is passed it will show up in PagerDuty as a table.

  • group (str | None) – A cluster or grouping of sources. For example, sources “prod-datapipe-02” and “prod-datapipe-03” might both be part of “prod-datapipe”

  • component (str | None) – The part or component of the affected system that is broken.

  • class_type (str | None) – The class/type of the event.

  • images (list[Any] | None) – List of images to include. Each dictionary in the list accepts the following keys: src: The source (URL) of the image being attached to the incident. This image must be served via HTTPS. href: [Optional] URL to make the image a clickable link. alt: [Optional] Alternative text for the image.

  • links (list[Any] | None) – List of links to include. Each dictionary in the list accepts the following keys: href: URL of the link to be attached. text: [Optional] Plain text that describes the purpose of the link, and can be used as the link’s text.

  • integration_key (str | None) – PagerDuty Events API token

  • pagerduty_events_conn_id (str) – connection that has PagerDuty integration key in the Pagerduty API token field

template_fields = ('summary', 'severity', 'source', 'action', 'dedup_key', 'custom_details', 'group', 'component',...[source]
hook()[source]

Pagerduty Events Hook.

notify(context)[source]

Send a alert to a pagerduty event v2 API.

airflow.providers.pagerduty.notifications.pagerduty.send_pagerduty_notification[source]

Was this entry helpful?