opsgenie
Configure Opsgenie for alert management, on-call scheduling, routing rules, and incident response. Use when a user needs to set up alert routing, create escalation policies, manage on-call rotations, integrate with monitoring tools, or automate incident workflows with Opsgenie.
What this skill does
# Opsgenie
## Overview
Set up Opsgenie for centralized alert management with routing rules, on-call schedules, escalation policies, and integrations. Covers alert API, team management, notification policies, and automation.
## Instructions
### Task A: Create Teams and Routing
```bash
# Create a team
curl -X POST "https://api.opsgenie.com/v2/teams" \
-H "Authorization: GenieKey ${OG_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "Platform Engineering",
"description": "Infrastructure and platform services team",
"members": [
{ "user": { "username": "[email protected]" }, "role": "admin" },
{ "user": { "username": "[email protected]" }, "role": "user" },
{ "user": { "username": "[email protected]" }, "role": "user" }
]
}'
```
```bash
# Create a routing rule for the team
curl -X POST "https://api.opsgenie.com/v2/teams/Platform%20Engineering/routing-rules" \
-H "Authorization: GenieKey ${OG_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "Critical Production Alerts",
"order": 0,
"criteria": {
"type": "match-all-conditions",
"conditions": [
{ "field": "priority", "operation": "equals", "expectedValue": "P1" },
{ "field": "tags", "operation": "contains", "expectedValue": "production" }
]
},
"notify": {
"type": "escalation",
"name": "Platform Critical Escalation"
},
"timezone": "America/New_York"
}'
```
### Task B: Create Alerts
```bash
# Create an alert
curl -X POST "https://api.opsgenie.com/v2/alerts" \
-H "Authorization: GenieKey ${OG_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"message": "Payment Service: Error rate exceeded 5%",
"alias": "payment-service-error-rate-prod",
"description": "Error rate for payment-service in production has exceeded the 5% threshold. Current rate: 8.3%.\n\nAffected endpoints: /api/charge, /api/refund\nDashboard: https://grafana.internal/d/payments",
"responders": [
{ "name": "Platform Engineering", "type": "team" }
],
"tags": ["production", "payment", "critical"],
"priority": "P1",
"entity": "payment-service",
"source": "prometheus-alertmanager",
"details": {
"error_rate": "8.3%",
"threshold": "5%",
"runbook": "https://wiki.internal/runbooks/payment-errors"
}
}'
```
```bash
# Acknowledge an alert
curl -X POST "https://api.opsgenie.com/v2/alerts/payment-service-error-rate-prod/acknowledge?identifierType=alias" \
-H "Authorization: GenieKey ${OG_API_KEY}" \
-H "Content-Type: application/json" \
-d '{ "user": "[email protected]", "note": "Investigating — checking database connections." }'
```
```bash
# Close an alert
curl -X POST "https://api.opsgenie.com/v2/alerts/payment-service-error-rate-prod/close?identifierType=alias" \
-H "Authorization: GenieKey ${OG_API_KEY}" \
-H "Content-Type: application/json" \
-d '{ "user": "[email protected]", "note": "Fixed connection pool sizing. Error rate back to normal." }'
```
### Task C: On-Call Schedules
```bash
# Create an on-call schedule with weekly rotation
curl -X POST "https://api.opsgenie.com/v2/schedules" \
-H "Authorization: GenieKey ${OG_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "Platform Primary On-Call",
"ownerTeam": { "name": "Platform Engineering" },
"timezone": "America/New_York",
"enabled": true,
"rotations": [
{
"name": "Weekday Rotation",
"type": "weekly",
"startDate": "2026-02-23T09:00:00Z",
"participants": [
{ "type": "user", "username": "[email protected]" },
{ "type": "user", "username": "[email protected]" },
{ "type": "user", "username": "[email protected]" }
],
"timeRestriction": {
"type": "weekday-and-time-of-day",
"restrictions": [
{ "startDay": "monday", "startHour": 9, "startMin": 0, "endDay": "friday", "endHour": 18, "endMin": 0 }
]
}
}
]
}'
```
```bash
# Get current on-call participants
curl -s "https://api.opsgenie.com/v2/schedules/Platform%20Primary%20On-Call/on-calls" \
-H "Authorization: GenieKey ${OG_API_KEY}" | \
jq '.data.onCallParticipants[] | {name: .name, type: .type}'
```
### Task D: Escalation Policies
```bash
# Create an escalation policy
curl -X POST "https://api.opsgenie.com/v2/escalations" \
-H "Authorization: GenieKey ${OG_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "Platform Critical Escalation",
"ownerTeam": { "name": "Platform Engineering" },
"rules": [
{
"condition": "if-not-acked",
"notifyType": "default",
"delay": { "timeAmount": 5 },
"recipient": { "type": "schedule", "name": "Platform Primary On-Call" }
},
{
"condition": "if-not-acked",
"notifyType": "default",
"delay": { "timeAmount": 15 },
"recipient": { "type": "user", "username": "[email protected]" }
},
{
"condition": "if-not-acked",
"notifyType": "all",
"delay": { "timeAmount": 30 },
"recipient": { "type": "team", "name": "Platform Engineering" }
}
],
"repeat": { "waitInterval": 10, "count": 3, "resetRecipientStates": true }
}'
```
### Task E: Integration with Prometheus Alertmanager
```yaml
# alertmanager.yml — Opsgenie receiver configuration
receivers:
- name: 'opsgenie-critical'
opsgenie_configs:
- api_key: '<OG_API_KEY>'
message: '{{ .CommonLabels.alertname }}: {{ .CommonAnnotations.summary }}'
description: '{{ .CommonAnnotations.description }}'
priority: '{{ if eq .CommonLabels.severity "critical" }}P1{{ else if eq .CommonLabels.severity "warning" }}P3{{ else }}P5{{ end }}'
tags: '{{ .CommonLabels.environment }},{{ .CommonLabels.service }}'
entity: '{{ .CommonLabels.service }}'
source: 'prometheus'
responders:
- name: 'Platform Engineering'
type: 'team'
details:
alertname: '{{ .CommonLabels.alertname }}'
cluster: '{{ .CommonLabels.cluster }}'
```
## Best Practices
- Use alert aliases for deduplication so the same issue doesn't create multiple alerts
- Configure notification policies per user — allow P1 alerts to phone at night, P3 only during work hours
- Use routing rules to direct alerts to the correct team based on tags and priority
- Set escalation timeouts based on SLA requirements — shorter for P1, longer for P3
- Add runbook URLs and dashboard links in alert details for faster resolution
- Use heartbeat monitoring to detect when integrations stop sending alerts
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.