ShiftBeta

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.json

Opsgenie 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 KEY

Prometheus 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: true

Grafana

Alerting → Contact points → Webhook, with this URL. Grafana sends the Alertmanager format.

https://shift.nightroll.app/i/KEY

Datadog

Integrations → Webhooks, with this URL. On the service in Shift, set the mapping to the Datadog preset.

https://shift.nightroll.app/i/KEY

Sentry

Settings → Integrations → Webhooks (or an internal integration), with this URL. Set the mapping to the Sentry preset.

https://shift.nightroll.app/i/KEY

Checkly

Alert channels → Webhook, with this URL. Set the mapping to the Checkly preset.

https://shift.nightroll.app/i/KEY

New Relic

Alerts → Destinations → Webhook, with this URL. Set the mapping to the New Relic preset.

https://shift.nightroll.app/i/KEY

Pulse

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/enqueue

Nagios, 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 recovery

Any other webhook

Point the tool at https://shift.nightroll.app/i/KEY. With no preset, Shift reads these fields from the JSON body:

FieldRead from
Summarysummary, else title, message or text
Dedup keydedup_key, else id or alert_id. Events with the same key fold into one alert.
Severityseverity: critical, error, warning or info (also p1 to p5, high, medium, low). Anything else is critical.
Resolvestatus, 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.