PagerDuty PagerDutyAlert

PagerDuty PagerDutyAlert

Certified

Send PagerDuty alert from errors task

Posts a raw Events API v2 payload from an errors handler to PagerDuty. Provide the Events endpoint URL and JSON payload (including routing_key and event_action). Keep credentials in secrets; see PagerDuty documentation.

yaml
type: io.kestra.plugin.pagerduty.PagerDutyAlert

Send a PagerDuty alert on a failed flow execution.

yaml
id: unreliable_flow
namespace: company.team

tasks:
  - id: fail
    type: io.kestra.plugin.scripts.shell.Commands
    runner: PROCESS
    commands:
      - exit 1

errors:
  - id: alert_on_failure
    type: io.kestra.plugin.pagerduty.PagerDutyAlert
    url: "{{ secret('PAGERDUTY_EVENT') }}" # https://events.pagerduty.com/v2/enqueue
    payload: |
      {
        "dedup_key": "samplekey",
        "routing_key": "samplekey",
        "event_action": "trigger",
        "payload" : {
            "summary": "PagerDuty alert",
            "source": "kestra",
            "severity": "error"
        }
      }

Send a PagerDuty acknowledge from an errors handler.

yaml
id: pagerduty_acknowledge
namespace: company.team

tasks:
  - id: do_work
    type: io.kestra.plugin.scripts.shell.Commands
    commands:
      - exit 1

errors:
  - id: acknowledge_existing_incident
    type: io.kestra.plugin.pagerduty.PagerDutyAlert
    url: "{{ secret('PAGERDUTY_EVENT') }}"
    payload: |
      {
        "dedup_key": "existing-incident-key",
        "routing_key": "samplekey",
        "event_action": "acknowledge",
        "payload": {
          "summary": "Acknowledge incident from Kestra",
          "source": "kestra",
          "severity": "error"
        }
      }
Properties
Min length1

PagerDuty Events API URL

Endpoint such as https://events.pagerduty.com/v2/enqueue; store secrets with secret().

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

HTTP client options

Optional overrides for timeouts, charset, and headers when calling PagerDuty. Defaults: read timeout 10s, read idle 5m, pool idle 0s, max content 10MB, charset UTF-8.

Definitions
connectTimeoutstring

Connect timeout before fail

connectionPoolIdleTimeoutstring
DefaultPT0S

Idle connection pool timeout

defaultCharsetstring
DefaultUTF-8

Default request charset

headersobject

HTTP headers

HTTP headers to include in the request

maxContentLengthintegerstring
Default10485760

Maximum response size in bytes

readIdleTimeoutstring
DefaultPT5M

Idle read timeout before close

readTimeoutstring
DefaultPT10S

Read timeout before fail

PagerDuty message payload

Raw JSON string sent to PagerDuty; must include routing_key and event_action. Supports templating.