Getting started · Integrations · API
Integrations
Replace KEY with an integration key from the service's card on Services. The key decides which service, and so which escalation policy, an alert goes to.
PagerDuty Events API v2
Change the host from events.pagerduty.com to shift.nightroll.app and use a Shift key as the routing key. Trigger, acknowledge and resolve work as they do on PagerDuty; change events are accepted and ignored.
POST https://shift.nightroll.app/v2/enqueue
{"routing_key":"KEY","event_action":"trigger","dedup_key":"db-1/disk",
"payload":{"summary":"Disk 90% full on db-1","source":"db-1","severity":"error"}}PagerDuty Events API v1
Older integrations: same host change, the key goes in service_key.
POST https://shift.nightroll.app/generic/2010-04-15/create_event.jsonOpsgenie Alert API
Change the host from api.opsgenie.com to shift.nightroll.app and send a Shift key in the GenieKey header. Create, close, acknowledge, unacknowledge, notes and request status are supported; heartbeats are not (use Pulse).
POST https://shift.nightroll.app/v2/alerts
Authorization: GenieKey KEYPrometheus Alertmanager
Add a webhook receiver. Each alert in a batch becomes its own Shift alert, and resolved ones close it.
receivers:
- name: shift
webhook_configs:
- url: https://shift.nightroll.app/i/KEY
send_resolved: trueGrafana
Alerting → Contact points → Webhook, with this URL. Grafana sends the Alertmanager format.
https://shift.nightroll.app/i/KEYDatadog
Integrations → Webhooks, with this URL. On the service in Shift, set the mapping to the Datadog preset.
https://shift.nightroll.app/i/KEYSentry
Settings → Integrations → Webhooks (or an internal integration), with this URL. Set the mapping to the Sentry preset.
https://shift.nightroll.app/i/KEYCheckly
Alert channels → Webhook, with this URL. Set the mapping to the Checkly preset.
https://shift.nightroll.app/i/KEYNew Relic
Alerts → Destinations → Webhook, with this URL. Set the mapping to the New Relic preset.
https://shift.nightroll.app/i/KEYPulse
Pulse (cron, heartbeat and uptime checks) sends PagerDuty Events v2 to Shift. In Pulse, add a Shift destination and paste a Shift key as its routing key.
https://shift.nightroll.app/v2/enqueueNagios, Icinga, cron or any shell
Install shift-send (a small sh script around curl) and call it from a notification command.
curl -fsSo /usr/local/bin/shift-send https://shift.nightroll.app/shift-send
chmod +x /usr/local/bin/shift-send
shift-send -k KEY -s "$HOSTNAME: $SERVICEDESC is $SERVICESTATE" -d "$HOSTNAME/$SERVICEDESC"
shift-send -k KEY -d "$HOSTNAME/$SERVICEDESC" -r # on recoveryAny other webhook
Point the tool at https://shift.nightroll.app/i/KEY. With no preset, Shift reads these fields from the JSON body:
| Field | Read from |
|---|---|
| Summary | summary, else title, message or text |
| Dedup key | dedup_key, else id or alert_id. Events with the same key fold into one alert. |
| Severity | severity: critical, error, warning or info (also p1 to p5, high, medium, low). Anything else is critical. |
| Resolve | status, state or event_action equal to resolved, resolve, ok or closed |
If your tool names them differently, set custom field paths on the service (dot paths such asdata.issue.title), including which field and value mean "resolved".
Answers
202 accepted · 400 bad key or body · 429 more than about 120 events a minute on one key (retry later) · 503 not stored, retry. Shift never answers 202 for an event it did not store.