AI-powered incident triage for PagerDuty. Read-only by default. Write operations require explicit confirmation.
Use this skill when the user:
OpenClaw Agent# Required — your PagerDuty REST API v2 token
export PAGERDUTY_API_KEY="u+your_key_here"
# Optional — required only for write operations (ack, resolve, note)
export PAGERDUTY_EMAIL="you@company.com"
Ask your agent: "What's firing on PagerDuty?"
incidents — List Active IncidentsLists all triggered and acknowledged incidents, sorted by urgency.
pager-triage incidents
Example output:
{
"tool": "pd_incidents",
"provider": "pagerduty",
"timestamp": "2026-02-16T03:45:00Z",
"total_incidents": 3,
"incidents": [
{
"id": "P123ABC",
"incident_number": 4521,
"title": "High CPU on prod-web-03",
"status": "triggered",
"urgency": "high",
"service": { "id": "PSVC123", "name": "Production Web" },
"created_at": "2026-02-16T03:00:00Z",
"assignments": [{ "name": "Jane Doe", "email": "..." }],
"alert_count": 3,
"escalation_level": 1,
"last_status_change": "2026-02-16T03:05:00Z"
}
],
"summary": "3 active incident(s): high (triggered) x1, high (acknowledged) x1, low (triggered) x1"
}
detail — Incident Deep DiveFull incident details including timeline (log entries), related alerts, notes, and automated analysis.
pager-triage detail P123ABC
Example output (abbreviated):
{
"tool": "pd_incident_detail",
"incident": {
"id": "P123ABC",
"title": "High CPU on prod-web-03",
"status": "triggered",
"urgency": "high",
"service": { "id": "PSVC123", "name": "Production Web" },
"escalation_policy": { "name": "Production Escalation" },
"assignments": [{ "name": "Jane Doe", "escalation_level": 1 }]
},
"timeline": [
{ "type": "trigger_log_entry", "created_at": "...", "summary": "Incident triggered via Prometheus Alertmanager" },
{ "type": "escalate_log_entry", "created_at": "...", "summary": "Escalated to Jane Doe (Level 1)" }
],
"alerts": [
{ "id": "A456DEF", "severity": "critical", "summary": "CPU > 95% on prod-web-03", "source": "Prometheus Alertmanager" }
],
"notes": [],
"analysis": {
"alert_count": 3,
"escalation_count": 1,
"acknowledged": false,
"trigger_source": "Prometheus Alertmanager"
}
}
oncall — On-Call SchedulesShows who's currently on call across all schedules and escalation policies.
pager-triage oncall
Example output:
{
"tool": "pd_oncall",
"oncalls": [
{
"user": { "name": "Jane Doe", "email": "jane@company.com" },
"schedule": { "name": "Primary SRE", "id": "PSCHED1" },
"escalation_policy": { "name": "Production Escalation" },
"escalation_level": 1,
"start": "2026-02-15T17:00:00Z",
"end": "2026-02-16T17:00:00Z"
}
],
"summary": "2 on-call assignment(s). Primary SRE: Jane Doe. Secondary SRE: Bob Smith."
}
services — List ServicesLists all PagerDuty services with their current operational status.
pager-triage services
Example output:
{
"tool": "pd_services",
"services": [
{
"id": "PSVC123",
"name": "Production Web",
"status": "critical",
"description": "Production web application servers",
"escalation_policy": "Production Escalation",
"integrations": ["Prometheus Alertmanager", "CloudWatch"]
}
],
"summary": "12 services: 1 critical, 1 warning, 10 active, 0 disabled"
}
recent — Recent Incident HistoryShows recent incidents for a service or across all services with summary statistics.
pager-triage recent # All services, last 24h
pager-triage recent --service PSVC123 # Specific service
pager-triage recent --since 7d # Last 7 days
pager-triage recent --service PSVC123 --since 30d
Flags:
| Flag | Default | Description |
|---|---|---|
| ------ | --------- | ------------- |
--service | all | Filter to a specific PagerDuty service ID |
--since | 24h | Time window: 24h, 7d, or 30d |
Example output:
{
"tool": "pd_recent",
"period": "last 24 hours",
"service": "PSVC123",
"incidents": [ ... ],
"stats": {
"total": 5,
"by_urgency": { "high": 2, "low": 3 },
"by_status": { "resolved": 4, "triggered": 1 },
"mean_time_to_resolve_minutes": 42
}
}
--confirm)These operations modify state in PagerDuty. They require the --confirm flag AND PAGERDUTY_EMAIL to be set. Without --confirm, the tool displays what it would do and exits.
ack --confirm — Acknowledge IncidentAcknowledges a triggered incident, stopping further escalation.
pager-triage ack P123ABC --confirm
Without --confirm, displays:
{
"error": "confirmation_required",
"message": "⚠️ ACKNOWLEDGE INCIDENT — --confirm flag is required to proceed.",
"incident": { "id": "P123ABC", "title": "High CPU on prod-web-03", "urgency": "high" },
"hint": "Re-run with --confirm to acknowledge this incident."
}
With --confirm:
{
"tool": "pd_incident_ack",
"incident_id": "P123ABC",
"status": "acknowledged",
"acknowledged_at": "2026-02-16T03:46:00Z",
"acknowledged_by": "jane@company.com"
}
resolve --confirm — Resolve IncidentResolves an incident, marking it as fixed.
pager-triage resolve P123ABC --confirm
Same confirmation pattern as ack. Without --confirm, shows incident details and exits. With --confirm, resolves and returns confirmation JSON.
note --content "text" --confirm — Add Incident NoteAdds a permanent note to an incident's timeline.
pager-triage note P123ABC --content "Root cause: memory leak in auth-service v2.14.3. Rolling back." --confirm
Flags:
| Flag | Required | Description |
|---|---|---|
| ------ | ---------- | ------------- |
--content | Yes | The note text to add |
--confirm | Yes | Confirmation gate |
Example output:
{
"tool": "pd_incident_note",
"incident_id": "P123ABC",
"note_id": "PNOTE456",
"content": "Root cause: memory leak in auth-service v2.14.3. Rolling back.",
"created_at": "2026-02-16T04:00:00Z",
"user": "Jane Doe"
}
When the user needs help triaging an incident, follow this workflow:
→ pager-triage incidents
List all active incidents. Prioritize by urgency (high first) and duration (oldest first).
→ pager-triage detail <incident_id>
Get full timeline, alerts, and notes. Identify the trigger source and escalation history.
If available, use companion skills to investigate root cause:
→ pager-triage ack <incident_id> --confirm # Stop escalation while investigating
→ pager-triage note <incident_id> --content "..." --confirm # Document findings
→ pager-triage resolve <incident_id> --confirm # Mark as fixed
incidentsdetailWhen the conversation is happening in a Discord channel:
Deep Dive IncidentAcknowledge IncidentAdd Incident Note--confirm--confirmOpsGenie integration is planned for a future release. When OPSGENIE_API_KEY is set, the same subcommands will map to OpsGenie's REST API with normalized output schemas.
Powered by Anvil AI · Built for the engineer who gets paged at 3am
共 1 个版本