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().

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.

Reference (ref) of the pluginDefaults to apply to this task.