PagerDuty
PagerDuty — users, schedules, services, incidents, on-call
weave pagerduty
Env: PAGERDUTY_TOKEN
Setup
Configure credentials via environment variables. We recommend sourcing them through 1Password or your secrets manager rather than committing them to the shell rc.
Official API reference
weave commands for this module are checked against the vendor's published API.
| Variable | Description | Status |
|---|---|---|
| PAGERDUTY_TOKEN | Required for authentication. | required |
| PAGERDUTY_API_URL | Required for authentication. | required |
| PAGERDUTY_FROM | Required for authentication. | required |
| PAGERDUTY_API_URL | API root (default: https://api.pagerduty.com). | optional |
| PAGERDUTY_FROM | From-address header for mutating API calls. | optional |
Sanity-check the wiring:
weave secrets check weave pagerduty --help weave doctor # reports PAGERDUTY_TOKEN status
Capabilities
What this module can do, by entity and verb. ✓
means a working CLI surface; · means
not (yet) wired.
| Entity | find | list | show | do | snapshot | diff | apply |
|---|---|---|---|---|---|---|---|
| incident | ✓ | ✓ | · | ✓ | · | · | · |
| oncall | · | · | ✓ | · | · | · | · |
| schedule | · | ✓ | · | · | · | · | · |
| service | · | ✓ | · | · | ✓ | ✓ | ✓ |
| team | · | ✓ | · | · | · | · | · |
| user | ✓ | ✓ | · | · | · | · | · |
Commands
Every registered CLI command, grouped by verb. Each example uses placeholder arguments — substitute real values for your environment.
find (2)
find incident
readFind an incident by id.
weave pagerduty find incident <incident-id>
find user
readFind a PagerDuty user by email.
weave pagerduty find user <email>
list (5)
list incidents
readList recent incidents.
weave pagerduty list incidents <arg>
list schedules
readList on-call schedules.
weave pagerduty list schedules <arg>
list services
readList PagerDuty services.
weave pagerduty list services <arg>
list teams
readList teams.
weave pagerduty list teams <arg>
list users
readList PagerDuty users.
weave pagerduty list users <arg>
show (1)
show oncall
readShow who is on-call right now (optionally for a schedule).
weave pagerduty show oncall <arg>
do (2)
do acknowledge
writeAcknowledge an incident by id.
weave pagerduty do acknowledge <incident-id>
do resolve
writeResolve an incident by id.
weave pagerduty do resolve <incident-id>
snapshot → edit YAML →
diff → apply --yes (or confirm
interactively; apply --dry-run previews the same diff).
State kinds
Resources this module can snapshot and
diff; apply where the kind supports
live writes (see Round-trip per kind). Always run
diff before apply; use
--yes in automation after review. Files live under
.weave-state/pagerduty/.
services
All services on the PagerDuty account (name, description, escalation policy).
State file skeleton
module: pagerduty kind: services items: - # <fields specific to this kind — see snapshot output>
Workflows
End-to-end recipes from operators who already run this module in production. Copy, adapt, and put under change-control.
Version-control service definitions
weave pagerduty snapshot services $EDITOR .weave-state/pagerduty/services.yaml weave pagerduty diff services weave pagerduty apply services --yes
Acknowledge and resolve an incident
weave pagerduty find incident <incident-id> weave pagerduty do acknowledge <incident-id> --yes weave pagerduty do resolve <incident-id> --yes
Who is on call right now?
weave pagerduty show oncall weave pagerduty list schedules
Find the on-call engineer during an outage
weave pagerduty show oncall weave pagerduty find user oncall@company.com weave pagerduty list services
Terraform parity
For each Terraform resource in the canonical provider, here's the equivalent live-API verb in weave. Use this as a migration cheat-sheet, not a 1:1 contract — weave deliberately stays in the live-state lane, not the desired-state lane.
| Terraform resource | weave equivalent |
|---|---|
| pagerduty_service | weave pagerduty snapshot/diff/apply services |
| pagerduty_incident | weave pagerduty find/list incident + do acknowledge/resolve |
| pagerduty_schedule | weave pagerduty list schedule / show oncall |
| pagerduty_user | weave pagerduty find/list user |
| pagerduty_team | weave pagerduty list team |
Troubleshooting & source
Run weave doctor — it reports which env
vars (including PAGERDUTY_TOKEN) are set
and which are blank.
Re-run weave pagerduty diff <kind>
to confirm the controller's current state, then re-snapshot
before the next apply. The driver always re-snapshots
before diffing.
The module lives at https://github.com/andy-broyles/weavewhatever/tree/main/src/weave/modules/pagerduty. File a bug or feature request at https://github.com/andy-broyles/weavewhatever/issues.