Ingest PagerDuty incidents, alerts, and notes into CortexDB.
PagerDuty Connector
Captures incident lifecycle from PagerDuty as CortexDB experiences. Webhook subscriptions for low-latency; REST polling as a fallback.
Two ways to run this connector:
- Run it yourself (Free + paid) —
pip install 'cortexdb-connectors[pagerduty]'thencortexdb-sync sync pagerduty. The connector reads your token from~/.cortexdb/state.json(written bycortexdb init) or from env vars. - Managed sync (Starter and up) — CortexDB runs the connector as a worker on its infrastructure. Configure it once from your dashboard; CortexDB handles webhook registration, retries, backfill, and idempotency.
1. Prepare credentials in PagerDuty
PagerDuty → Integrations → API Access Keys → Create new key (read-only).
2. Configure in your CortexDB dashboard
- Sign in at cortexdb.ai/login.
- Settings → Connectors → Add Connector → PagerDuty.
- Paste the API key.
- Optionally restrict to specific service IDs (comma-separated; default: every service the key can read).
- Set the scope template. Default:
org:<your-org>/source:pagerduty/service:{service_id}. - Pick sync mode: Real-time (webhook) or Polling.
- Click Start sync.
What gets written
| Event | Modality | Notes |
|---|---|---|
| Incident triggered | observation | Severity, summary, affected service as labels |
| Incident acknowledged / resolved | observation | State change as triple |
| Note added to incident | conversation | role=user; preceded_by links to incident |
| Postmortem published | document | Full postmortem body |
idempotency_key shape: pd:<incident_id>:<log_entry_id> — every state change writes once.
Why this matters
Incident memory is the canonical case for bi-temporal queries: "what did we know at 02:14 vs 03:20" drives root-cause investigation. CortexDB's as_of query against /v1/recall answers exactly that.
Run it yourself
If you'd rather host the connector yourself instead of using CortexDB's managed worker, every connector ships in the cortexdb-connectors PyPI package:
pip install 'cortexdb-connectors[pagerduty]'
# Step 1: get a CortexDB token + actor (one-time, free tier)
pip install cortexdb-cli
cortexdb init
# Step 2: supply the connector's third-party credentials
export PAGERDUTY_API_KEY=... # required
# Step 3: one-shot sync, or `watch` for a poll loop
cortexdb-sync sync pagerduty
cortexdb-sync watch pagerduty --interval 60
cortexdb-sync reads your CortexDB token + actor from ~/.cortexdb/state.json automatically. Cursor state is persisted in ~/.cortexdb/connectors-state.json, so re-running picks up where the last cycle left off.