Registry / workflow / dagster-pagerduty

dagster-pagerduty

JSON →
library0.29.9pypypi✓ verified 86d ago

Dagster PagerDuty is a library that provides an integration between Dagster, a data orchestration platform, and PagerDuty, a SaaS incident response platform. It enables users to programmatically create alerts from their Dagster code by wrapping PagerDuty's Events API V2. Currently at version 0.29.0, this library is part of the larger Dagster monorepo, with its versioning for libraries like dagster-pagerduty aligning with the main dagster core releases (e.g., core 1.13.0 corresponds to libraries 0.29.0).

pip install dagster-pagerduty
INSTALL
IMPORT
SIG · DAGSTER-PAGERDUTY
D
dagster-pagerduty
workflowpythonv0.29.9
Install
13.5s avg
Import
3367ms
Disk
135MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.29.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 3.522s · 132.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 13.5s · import 3.212s · 129MB
135MB installed
● package 135MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PagerDutyService
from dagster_pagerduty import PagerDutyService
from dagster_pagerduty import pagerduty_resource
`pagerduty_resource` is a legacy resource definition. `PagerDutyService` is the recommended Pythonic resource for newer Dagster versions.
dagster
import dagster as dg
Standard alias for the core Dagster library.

This quickstart demonstrates how to define a `PagerDutyService` resource and use it within a Dagster asset to trigger a PagerDuty alert. The `routing_key` (PagerDuty Events API V2 integration key) should be securely provided, typically via an environment variable. When the `critical_data_check` asset encounters a simulated failure, it sends a 'critical' event to PagerDuty.

import dagster as dg from dagster_pagerduty import PagerDutyService import os @dg.asset def critical_data_check(pagerduty: PagerDutyService): # Simulate a check that might fail if os.environ.get('SIMULATE_FAILURE') == 'true': summary_message = "Critical data check failed!" pagerduty.EventV2_create( summary=summary_message, source="data_pipeline_monitor", severity="critical", event_action="trigger", details={ "run_url": "https://dagster.example.com/runs/abc123", "error_message": "Data quality threshold breached." } ) raise Exception(summary_message) else: print("Critical data check passed.") defs = dg.Definitions( assets=[critical_data_check], resources={ "pagerduty": PagerDutyService(routing_key=os.environ.get('PAGERDUTY_ROUTING_KEY', '')) }, ) # To run locally (ensure PAGERDUTY_ROUTING_KEY is set in your environment): # from dagster import materialize_to_memory # import os # os.environ['PAGERDUTY_ROUTING_KEY'] = 'your_pagerduty_integration_key' # # Set SIMULATE_FAILURE to 'true' to trigger an alert # # os.environ['SIMULATE_FAILURE'] = 'true' # result = materialize_to_memory(defs.get_assets_def_for_asset_keys(["critical_data_check"]), resources=defs.resources) # assert result.success # Will fail if SIMULATE_FAILURE is 'true' and exception is raised
Debug
Known issues
deprecatedThe `pagerduty_resource` function is considered legacy. Users should migrate to `PagerDutyService` class-based resource definitions for improved type hinting and Pydantic-backed configuration, especially with Dagster 1.3+ and newer.
fix
Replace usages of `@resource` decorated functions like `pagerduty_resource` with `PagerDutyService(routing_key=...)` directly in your `Definitions` or as a `ConfigurableResource` subclass.
affects: Dagster 1.3.0 and newer (dagster-pagerduty 0.27.0 and newer)
gotchaPagerDuty alerts require a valid Events API V2 integration key (routing key). This key must be configured correctly in PagerDuty for a specific service, and then provided to the `PagerDutyService` resource. An incorrect or missing key will result in API errors.
fix
Ensure you have created an Events API V2 integration in your PagerDuty service and obtained the 'Integration Key' (routing key). Pass this key to the `routing_key` parameter of `PagerDutyService`.
affects: All versions
gotchaAlerts triggered via `dagster-pagerduty` rely on the PagerDuty API. If PagerDuty itself is not configured to send notifications (e.g., no one is on call for the affected service, or suppression rules are active), the alert may be triggered in PagerDuty but not result in an actual notification.
fix
Verify your PagerDuty service's escalation policies, on-call schedules, and suppression rules. Ensure there is an active on-call responder for the service receiving the alerts from Dagster.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dagster_pagerduty'
The `dagster-pagerduty` library has not been installed in the current Python environment.
fix
Run `pip install dagster-pagerduty`.
pagerduty.EventV2_create() failed: 401 Unauthorized / 400 Bad Request
This typically indicates an issue with the PagerDuty routing key or the structure of the event payload. A '401 Unauthorized' points to an invalid or missing routing key. A '400 Bad Request' suggests malformed data in the `EventV2_create` call.
fix
Double-check that the `routing_key` provided to `PagerDutyService` is correct and active for an Events API V2 integration in PagerDuty. Review the `summary`, `source`, `severity`, and `event_action` parameters to ensure they conform to PagerDuty's Events API V2 specification.
dagster._core.errors.DagsterInvalidConfigError: Received an invalid value for config 'resources': Expected 'pagerduty' to be a 'ResourceDefinition'.
This error occurs when an incorrect type or old-style definition is used for the PagerDuty resource, particularly with newer Dagster versions expecting Pythonic resources.
fix
Ensure you are using `PagerDutyService` (a class-based resource) and correctly instantiating it, e.g., `resources={'pagerduty': PagerDutyService(routing_key='your_key')}`. Avoid using `@resource` decorated functions if you are on a modern Dagster version.
Upgrade
Version history
0.29.9latest on PyPI · released Jun 11, 2026
Audit
Dependencies
dagsterrequiredCore Dagster library is required as dagster-pagerduty is an integration package. This library requires Python >=3.10, <3.15.
Agent activity
35 hits · last 30 days
node
32
OpenAI (training)
1
Resources
dagster-pagerduty — pip install dagster-pagerduty · libregistry