Prerequisites
- PagerDuty account
- REST API key with read access
Setup
Option 1: Interactive CLI
Option 2: Environment variables
Add to your.env:
Option 3: Persistent store
Creating an API key
- In PagerDuty, go to Integrations → Developer Tools → API Access Keys
- Click Create New API Key
- Add a description (e.g.
opensre read-only) - Copy the key immediately — it won’t be shown again
PagerDuty API keys are account-level. Use a read-only key to follow the principle of least privilege.
Verify
Available tools
Example investigation context
During an investigation, OpenSRE may use PagerDuty tools to:- Find which incidents were triggered around the alert time window
- Identify who was on-call and how quickly incidents were acknowledged
- Map which services and escalation policies were involved
- Correlate PagerDuty incident timelines with Grafana/Datadog metrics
Troubleshooting
Security best practices
- Use a read-only API key — OpenSRE never needs to modify PagerDuty resources.
- Store the API key in
.env, not in source code. - Rotate API keys periodically via the PagerDuty Developer Tools page.