home / skills / openclaw / skills / pagerduty
This skill helps you manage PagerDuty incidents, on-call schedules, and alerts programmatically, triggering and resolving events via API integration.
npx playbooks add skill openclaw/skills --skill pagerdutyReview the files below or copy the command above to add this skill to your agents.
---
name: pagerduty
description: Manage incidents, on-call schedules, and alerts via PagerDuty API. Trigger and resolve incidents programmatically.
metadata: {"clawdbot":{"emoji":"🚨","requires":{"env":["PAGERDUTY_API_KEY"]}}}
---
# PagerDuty
Incident management.
## Environment
```bash
export PAGERDUTY_API_KEY="u+xxxxxxxxxx"
export PAGERDUTY_SERVICE_ID="PXXXXXX"
export PAGERDUTY_ROUTING_KEY="xxxxxxxxxx" # For Events API
```
## Trigger Incident (Events API v2)
```bash
curl -X POST "https://events.pagerduty.com/v2/enqueue" \
-H "Content-Type: application/json" \
-d '{
"routing_key": "'$PAGERDUTY_ROUTING_KEY'",
"event_action": "trigger",
"dedup_key": "incident-123",
"payload": {
"summary": "Server CPU at 95%",
"severity": "critical",
"source": "monitoring-system"
}
}'
```
## Resolve Incident
```bash
curl -X POST "https://events.pagerduty.com/v2/enqueue" \
-H "Content-Type: application/json" \
-d '{
"routing_key": "'$PAGERDUTY_ROUTING_KEY'",
"event_action": "resolve",
"dedup_key": "incident-123"
}'
```
## List Incidents
```bash
curl "https://api.pagerduty.com/incidents?statuses[]=triggered&statuses[]=acknowledged" \
-H "Authorization: Token token=$PAGERDUTY_API_KEY"
```
## Get On-Call
```bash
curl "https://api.pagerduty.com/oncalls" \
-H "Authorization: Token token=$PAGERDUTY_API_KEY"
```
## List Services
```bash
curl "https://api.pagerduty.com/services" \
-H "Authorization: Token token=$PAGERDUTY_API_KEY"
```
## Links
- Dashboard: https://app.pagerduty.com
- Docs: https://developer.pagerduty.com
This skill lets you manage incidents, alerts, and on-call data in PagerDuty using the PagerDuty API. It supports triggering and resolving incidents via the Events API, listing active incidents, querying on-call schedules, and enumerating services. Use environment variables for API credentials and routing/service identifiers.
The skill sends HTTP requests to PagerDuty endpoints: the Events API v2 for trigger/resolve actions and the REST API for incidents, on-calls, and services. It reads API keys and routing/service IDs from environment variables and constructs JSON payloads for alerts and control actions. Responses are parsed to return incident IDs, status, and relevant metadata.
What environment variables are required?
Set PAGERDUTY_API_KEY for REST API calls and PAGERDUTY_ROUTING_KEY for the Events API. Optionally set PAGERDUTY_SERVICE_ID when targeting a specific service.
How do I correlate a trigger and its resolution?
Include a consistent dedup_key in both trigger and resolve events so PagerDuty links them as the same incident.