/itsm-tooling-skills:pagerduty-and-opsgenie-oncall-configurationfrom itsm-tooling-skills
Configures on-call schedules, escalation policies, alert routing/deduplication, and maintenance windows in PagerDuty and Opsgenie via API or Terraform. Use when setting up rotations, writing escalation policies, routing alerts from monitoring tools, or migrating between platforms.
Ships in itsm-tooling-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An on-call rotation is only as good as its configuration: a schedule with a timezone mistake pages someone at 3am for a shift that was supposed to start at 9am local; an escalation policy missing a second rung means an unacknowledged page just... stops; and alert routing without deduplication turns one noisy dependency into fifty pages for the same outage, training responders to ignore their pager. This skill covers the concrete PagerDuty and Opsgenie configuration — schedules, layers, escalation policies, event orchestration/alert policies, deduplication keys, and maintenance windows — that implements the on-call process. The process itself (severity levels, Incident Command roles, rotation length, follow-the-sun design) is covered in incident-response-and-on-call-management; this skill is where that design becomes an actual escalation policy JSON payload or Terraform resource. Whether that configuration is correct — no gaps, no single point of failure — is a separate concern covered in pagerduty-opsgenie-configuration-validation.
${PAGERDUTY_API_TOKEN})
with write scope on schedules/escalation policies/services, or
Opsgenie API key (${OPSGENIE_API_KEY}) with admin/configuration
access — never hardcode either in a config file or script.pagerduty/pagerduty or opsgenie/opsgenie (or direct REST calls) —
Terraform is strongly preferred over console clicks so schedules and
escalation policies are diffable and reviewable in a PR.dedup_key/alias, severity, source service) to route and deduplicate
on — see
prometheus-and-grafana-monitoring-stack
for the Alertmanager side of getting that metadata into the alert
payload in the first place.Model the schedule as layers (PagerDuty) or rotations (Opsgenie). PagerDuty layers stack — a base weekly rotation plus an override layer for holidays — and later layers take priority:
{
"schedule": {
"name": "payments-primary-oncall",
"time_zone": "America/New_York",
"schedule_layers": [
{
"name": "Weekly Rotation",
"start": "2026-08-03T09:00:00-04:00",
"rotation_virtual_start": "2026-08-03T09:00:00-04:00",
"rotation_turn_length_seconds": 604800,
"users": [
{ "user": { "id": "PXXXXX1", "type": "user_reference" } },
{ "user": { "id": "PXXXXX2", "type": "user_reference" } },
{ "user": { "id": "PXXXXX3", "type": "user_reference" } }
]
}
]
}
}
Opsgenie equivalent (a rotation inside a schedule):
{
"name": "payments-primary-oncall",
"timezone": "America/New_York",
"rotations": [
{
"name": "weekly-rotation",
"startDate": "2026-08-03T13:00:00Z",
"type": "weekly",
"participants": [
{ "type": "user", "id": "user-uuid-1" },
{ "type": "user", "id": "user-uuid-2" },
{ "type": "user", "id": "user-uuid-3" }
]
}
]
}
Set time_zone/timezone explicitly to the team's actual timezone,
not the account default — a schedule silently inheriting UTC is the
single most common cause of "the page went out at the wrong time."
Write the escalation policy with at least two independent rungs. PagerDuty:
{
"escalation_policy": {
"name": "payments-team-escalation",
"num_loops": 2,
"escalation_rules": [
{
"escalation_delay_in_minutes": 5,
"targets": [{ "id": "SCHED-PRIMARY-ID", "type": "schedule_reference" }]
},
{
"escalation_delay_in_minutes": 10,
"targets": [{ "id": "SCHED-SECONDARY-ID", "type": "schedule_reference" }]
},
{
"escalation_delay_in_minutes": 15,
"targets": [{ "id": "USER-MANAGER-ID", "type": "user_reference" }]
}
]
}
}
num_loops: 2 means the whole chain repeats twice before the incident
is marked unacknowledged and left open — don't leave this at the
default of 0 (no repeat) for anything Sev1/Sev2-capable.
Opsgenie's equivalent is an escalation object referencing a team
and rules:
{
"name": "payments-team-escalation",
"ownerTeam": { "name": "payments" },
"rules": [
{ "condition": "if-not-acked", "notifyType": "default", "delay": { "timeAmount": 5 }, "recipient": { "type": "schedule", "name": "payments-primary-oncall" } },
{ "condition": "if-not-acked", "notifyType": "default", "delay": { "timeAmount": 10 }, "recipient": { "type": "schedule", "name": "payments-secondary-oncall" } },
{ "condition": "if-not-acked", "notifyType": "default", "delay": { "timeAmount": 15 }, "recipient": { "type": "user", "username": "[email protected]" } }
]
}
Whether this policy actually has redundant coverage at every rung (not just two rungs that both happen to point at the same one person) is the specific thing pagerduty-opsgenie-configuration-validation checks — do that validation after writing any escalation policy, not only when something goes wrong.
Route alerts to the correct service/team with explicit rules, not a single catch-all integration. PagerDuty Event Orchestration lets you route on payload fields before an event even creates an incident:
# PagerDuty Event Orchestration (router) — abbreviated
sets:
- id: start
rules:
- label: "Route payments alerts to payments service"
conditions:
- expression: "event.summary matches part 'payments'"
actions:
route_to: "SERVICE-PAYMENTS-ID"
- label: "Route checkout alerts to checkout service"
conditions:
- expression: "event.summary matches part 'checkout'"
actions:
route_to: "SERVICE-CHECKOUT-ID"
Opsgenie uses alert policies on the team/integration with match
conditions and a routeTo action, evaluated similarly. Either way,
route on a stable field the monitoring source guarantees is present
(a service or team label from Alertmanager, not a free-text
message you have to substring-match).
Deduplicate at the source, using a stable key, not the tool's
default event-per-alert behavior. PagerDuty's Events API v2 accepts
a dedup_key — reusing the same key across firing/resolving events
for the same underlying problem collapses them into one incident:
{
"routing_key": "${PAGERDUTY_INTEGRATION_KEY}",
"event_action": "trigger",
"dedup_key": "payments-db-replica-lag-us-east-1",
"payload": {
"summary": "Replica lag exceeds 30s on payments-db-replica-2",
"severity": "critical",
"source": "payments-db-replica-2"
}
}
Opsgenie's equivalent is alias — sending a new event with the same
alias updates the existing alert instead of creating a new one:
{
"message": "Replica lag exceeds 30s on payments-db-replica-2",
"alias": "payments-db-replica-lag-us-east-1",
"priority": "P1"
}
Derive the key from stable identity (resource + check name), not from anything that changes per firing (a timestamp, a random ID) — a key that changes every time defeats deduplication entirely.
Configure maintenance windows and overrides for planned work, rather than muting a whole service (which also blocks real unrelated incidents). PagerDuty:
{
"maintenance_window": {
"start_time": "2026-08-01T02:00:00Z",
"end_time": "2026-08-01T04:00:00Z",
"services": [{ "id": "SERVICE-PAYMENTS-ID", "type": "service_reference" }],
"description": "Scheduled payments-db major version upgrade"
}
}
Scope maintenance windows to the specific service under maintenance, with a description that explains why — a team finding an unexplained maintenance window six months later has no way to know if it's safe to remove.
Set per-user notification rules deliberately (push → SMS → phone call escalation within the user's own device preferences), and require every on-call user to have at least two contact methods configured — a user with only a push notification and a phone that's on Do Not Disturb is a silent gap in the rotation regardless of how correct the escalation policy is.
Manage all of the above as code (Terraform pagerduty_schedule,
pagerduty_escalation_policy, opsgenie_schedule,
opsgenie_escalation resources, or version-controlled JSON applied
via CI) rather than console edits, so a schedule or escalation change
goes through the same review as any other production configuration
change.
dedup_key/alias derived from resource + check name) so one root
cause never fans out into dozens of pages; pair with Alertmanager-side
grouping if the monitoring stack supports it.Symptom: An escalation policy has a single rung, or every rung points at the same one person (e.g. rung 1 pages a schedule with one member, rung 2 pages that same person directly). Fix: This is a single point of failure — if that person is unreachable, the page never actually escalates to anyone new. Add at least one independent human at a later rung (secondary on-call, a manager, a different team member) and validate it with pagerduty-opsgenie-configuration-validation rather than trusting a visual policy review.
Symptom: One flapping check or one root-cause outage generates
dozens of separate pages within minutes, and responders start
acknowledging without reading — "alert fatigue" in its most literal
form.
Fix: Add a stable dedup_key/alias at the event-submission layer
so repeated firings of the same underlying condition update one
incident instead of creating new ones, and check whether the
monitoring source itself (Alertmanager group_by) should be
correlating these before they ever reach PagerDuty/Opsgenie.
Symptom: A schedule was created without setting time_zone
explicitly; it inherited the PagerDuty account's default timezone
(often UTC), so the "9am–5pm local" rotation actually runs on a
4-8 hour offset from what the team intended.
Fix: Set time_zone/timezone explicitly on every schedule at
creation time, and audit existing schedules whenever a rotation
member's location changes.
Symptom: A maintenance window is set on an entire service to silence a known noisy alert, and a real, unrelated incident on that same service goes unpaged during the window. Fix: Scope maintenance windows as narrowly as the tool allows (specific alert/integration where supported, not the whole service), keep them time-bound with an end time, and prefer fixing/tuning the noisy alert over muting the service long-term.
Symptom: A user's notification rules are only "push notification," and their phone is in Do Not Disturb mode during an off-hours page — the escalation policy looks correct on paper but the actual human never gets notified. Fix: Require every on-call-eligible user to configure at least two escalating contact methods (push → SMS → phone call) and periodically audit for users with only one configured.
Scenario: The payments team needs a primary/secondary weekly
rotation, a three-rung escalation policy, alert routing that separates
payments-api from payments-db alerts, and deduplication for a known
flapping replica-lag check — configured in PagerDuty via Terraform.
resource "pagerduty_schedule" "payments_primary" {
name = "payments-primary-oncall"
time_zone = "America/New_York"
layer {
name = "Weekly Rotation"
start = "2026-08-03T09:00:00-04:00"
rotation_virtual_start = "2026-08-03T09:00:00-04:00"
rotation_turn_length_seconds = 604800
users = [pagerduty_user.alice.id, pagerduty_user.bob.id, pagerduty_user.carla.id]
}
}
resource "pagerduty_schedule" "payments_secondary" {
name = "payments-secondary-oncall"
time_zone = "America/New_York"
layer {
name = "Weekly Rotation"
start = "2026-08-03T09:00:00-04:00"
rotation_virtual_start = "2026-08-03T09:00:00-04:00"
rotation_turn_length_seconds = 604800
users = [pagerduty_user.dan.id, pagerduty_user.eve.id]
}
}
resource "pagerduty_escalation_policy" "payments" {
name = "payments-team-escalation"
num_loops = 2
rule {
escalation_delay_in_minutes = 5
target {
type = "schedule_reference"
id = pagerduty_schedule.payments_primary.id
}
}
rule {
escalation_delay_in_minutes = 10
target {
type = "schedule_reference"
id = pagerduty_schedule.payments_secondary.id
}
}
rule {
escalation_delay_in_minutes = 15
target {
type = "user_reference"
id = pagerduty_user.eng_manager.id
}
}
}
resource "pagerduty_service" "payments_db" {
name = "payments-db"
escalation_policy = pagerduty_escalation_policy.payments.id
alert_creation = "create_alerts_and_incidents"
}
Alertmanager sends the replica-lag alert with a stable dedup_key
derived from {{ .Labels.instance }} (not a timestamp), so a check that
flaps every 30 seconds for ten minutes produces one PagerDuty incident,
not twenty:
{
"routing_key": "${PAGERDUTY_INTEGRATION_KEY}",
"event_action": "trigger",
"dedup_key": "payments-db-replica-lag-payments-db-replica-2",
"payload": {
"summary": "Replica lag exceeds 30s on payments-db-replica-2",
"severity": "critical",
"source": "payments-db-replica-2",
"custom_details": { "service": "payments-db" }
}
}
Before rolling this out, run the escalation-coverage check from
pagerduty-opsgenie-configuration-validation
against payments-team-escalation to confirm rung 1 and rung 2 resolve
to genuinely different humans, not an overlapping roster.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pagerduty, opsgenie, on-call, incident-management, alert-routing, terraform
6 skills in this plugin
/chatops-runbook-automationGuides building ChatOps incident-channel bots (Slack/Microsoft Teams) and automated runbook execution (StackStorm/Rundeck-style) — slash commands that run a diagnostic or remediation action from inside the incident channel, permission-scoped and confirmation-gated destructive actions, audit logging of every executed action, and balancing automation speed against the risk of an accidental or unauthorized destructive action. Use when the user asks to "build a Slack bot for incident response," "automate a runbook so on-call can run it from chat," "wire a restart/rollback command into our incident channel," "add a confirmation step before a destructive ChatOps action," or "audit what runbook actions were executed during an incident."
/linear-issue-tracking-best-practicesGuides Linear's cycle-based workflow model — Issues, Projects, and time-boxed Cycles instead of Jira's sprint/board configuration, Linear's opinionated status workflow (Triage → Backlog → Todo → In Progress → In Review → Done/Cancelled), its keyboard-driven/low- friction issue creation philosophy, and the Linear API/SDK for programmatic issue management. Use when the user asks to "set up Linear for our team," "should we use Linear or Jira," "create a Linear issue via the API," "design our Linear cycle/project structure," "why did our Jira migration to Linear feel different," or "reduce process overhead in our issue tracker." Cross-references the Jira-focused ticket-workflow skill for teams comparing or migrating between tools.
/pagerduty-opsgenie-configuration-validationValidates PagerDuty and Opsgenie escalation policy and schedule configuration for coverage gaps and single points of failure before an incident exposes them — checking that every rung resolves to a genuinely independent human, that schedules have no unstaffed windows, and that num_loops/repeat settings actually repeat. Use when the user asks to "audit our escalation policies," "check if our on-call schedule has gaps," "make sure this policy isn't a single point of failure," "test our PagerDuty/Opsgenie configuration before relying on it," or after any roster/schedule change to confirm coverage still holds.
/servicenow-itsm-configuration-validationValidates ServiceNow Incident/Change/Problem workflow, approval, and assignment-routing configuration before it blocks or misroutes a real incident — checking CMDB CI-to-team mappings for gaps, Emergency Change approval routing for actual reachability, sync-flow idempotency, and workflow transition logic for dead ends. Use when the user asks to "validate our ServiceNow change workflow before we depend on it," "check our CMDB assignment routing for gaps," "test the emergency change approval path actually works," "why do incidents keep landing in the wrong assignment group," or "audit our ServiceNow flows before a real incident is the first time we find a bug." Pairs with the existing servicenow-itsm-integration skill.
/servicenow-itsm-integrationIntegrates ServiceNow Incident, Change, and Problem management with engineering paging/incident tools (PagerDuty, Opsgenie) for ITIL-heavy enterprises that need an auditable, compliance-grade record alongside fast real-time paging — Table API incident sync, Change Request approval workflow (including emergency changes during an active incident), Problem record linkage, and CMDB-based assignment routing. Use when the user asks to "sync PagerDuty incidents into ServiceNow," "set up a ServiceNow change request for a production deploy," "link an incident to a problem record," "route a ServiceNow incident to the right assignment group," or "our ServiceNow and PagerDuty incidents are out of sync."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin itsm-tooling-skillsOther plugins' skills for the same job