airflow.providers.pagerduty.notifications.pagerduty

属性

send_pagerduty_notification

PagerdutyNotifier

Pagerduty 基本通知器。

模块内容

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)[源码]

基类: airflow.providers.common.compat.notifier.BaseNotifier

Pagerduty 基本通知器。

参数:
  • summary (str) – 事件摘要

  • severity (str) – 事件严重程度,必须是以下之一:info, warning, error, critical

  • source (str) – 特定的、人类可读的唯一标识符,例如主机名,用于标识出现问题的系统。

  • action (str) – 事件动作,必须是以下之一:trigger, acknowledge, resolve。如果未指定,默认为 trigger。

  • dedup_key (str | None) – 标识给定事件触发的警报的字符串。对于 acknowledge 和 resolve 动作是必需的。

  • custom_details (Any | None) – 事件的自由格式详细信息。可以是字典或字符串。如果传入字典,它将以表格形式显示在 PagerDuty 中。

  • group (str | None) – 源的集群或分组。例如,源“prod-datapipe-02”和“prod-datapipe-03”可能都是“prod-datapipe”的一部分

  • component (str | None) – 受影响系统中损坏的部分或组件。

  • class_type (str | None) – 事件的类别/类型。

  • images (list[Any] | None) – 要包含的图片列表。列表中的每个字典接受以下键:src: 附加到事件的图片的源 (URL)。此图片必须通过 HTTPS 提供。href: [可选] 将图片设为可点击链接的 URL。alt: [可选] 图片的替代文本。

  • links (list[Any] | None) – 要包含的链接列表。列表中的每个字典接受以下键:href: 要附加的链接的 URL。text: [可选] 描述链接用途的纯文本,可用作链接的文本。

  • integration_key (str | None) – PagerDuty Events API 令牌

  • pagerduty_events_conn_id (str | None) – 在 Pagerduty API 令牌字段中包含 PagerDuty 集成密钥的连接

template_fields = ('summary', 'severity', 'source', 'action', 'dedup_key', 'custom_details', 'group', 'component',...[源码]
pagerduty_events_conn_id = 'pagerduty_events_default'[源码]
integration_key = None[源码]
summary[源码]
severity[源码]
source = 'airflow'[源码]
action = 'trigger'[源码]
dedup_key = None[源码]
custom_details = None[源码]
group = None[源码]
component = None[源码]
class_type =None[源码]
images = None[源码]
property hook: airflow.providers.pagerduty.hooks.pagerduty_events.PagerdutyEventsHook[源码]

Pagerduty 事件 Hook。

notify(context)[源码]

发送警报到 Pagerduty 事件 v2 API。

airflow.providers.pagerduty.notifications.pagerduty.send_pagerduty_notification[源码]

此条目是否有帮助?