---
title: "Use PagerDuty for paging and keep · Agent Wranglers"
url: https://agentwranglers.se/playbook/stack/operations-tools/pagerduty
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Use PagerDuty for paging and keep schedules as code

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

For AI agents: [llms.txt](https://agentwranglers.se/llms.txt) is a short guide that sends you to the rules your problem needs, and [rules.json](https://agentwranglers.se/playbook/stack/rules.json) holds every rule of this playbook as JSON.

- Level: Recommended
- Chapter: [Operations tools](https://agentwranglers.se/playbook/stack/operations-tools)
- Rule: Page people through PagerDuty, and keep its schedules, escalation policies and services in Terraform in your repository.
- Cost: Paid. PagerDuty charges per user. No open source pager passes the five tests, as How explains.
- How: Paging must work when your own servers are down, so a managed service fits here. No open source pager passes the tests today. The open source Grafana OnCall is archived, and GoAlert has never had a stable 1.0 release. A self-hosted pager also needs a paid SMS and voice provider. PagerDuty has run since 2009, so judge it by the exit test. Its REST API lists every schedule, escalation policy, service and incident. Its official Terraform provider keeps the whole setup as code you can move to another tool. Route alerts to it from Alertmanager or Grafana. How to run the rota is in [Share on-call fairly](https://agentwranglers.se/playbook/operations/alerts-and-on-call/on-call-rota). Choose something else when your incident tool already includes on-call, such as Jira Service Management, and test its export first.
- Check: `terraform plan` shows 0 changes against the live account. A test alert reaches the person on call by phone within 5 minutes.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Terraform example

```hcl
resource "pagerduty_schedule" "primary" {
  name      = "Orders primary"
  time_zone = "Europe/Stockholm"
  layer {
    name                         = "Weekly"
    start                        = "2026-11-02T09:00:00+01:00"
    rotation_virtual_start       = "2026-11-02T09:00:00+01:00"
    rotation_turn_length_seconds = 604800
    users                        = [pagerduty_user.ana.id, pagerduty_user.ben.id]
  }
}
```

### YAML example

```yaml
# alertmanager.yml
receivers:
  - name: on-call
    pagerduty_configs:
      - routing_key_file: /etc/alertmanager/pagerduty-key
route:
  receiver: on-call
```

## Sources

- [GoAlert releases](https://github.com/target/goalert/releases)
- [PagerDuty REST API](https://docs.pagerduty.com/developer/api/reference/rest/escalation-policies/list-escalation-policies)
- [PagerDuty Terraform provider](https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs)

## Related rules

- [Share on-call fairly](https://agentwranglers.se/playbook/operations/alerts-and-on-call/on-call-rota) in Operations
- [Avoid paging tools that are shutting down](https://agentwranglers.se/playbook/stack/operations-tools/ending-paging-tools) in Software choices

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/stack/operations-tools/pagerduty">Agent Wranglers software choices playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Use Uptime Kuma on another provider for uptime checks](https://agentwranglers.se/playbook/stack/operations-tools/uptime-kuma)
- Next: [Use pg_dump and pgBackRest for Postgres backups](https://agentwranglers.se/playbook/stack/operations-tools/postgres-backups)
- [Operations tools](https://agentwranglers.se/playbook/stack/operations-tools)
