Quickstart

Get a monitor pinging and an alert firing in about five minutes.

This guide walks through the shortest path from a fresh account to a live heartbeat. You will create a team, copy your webhook secret, install the SDK, and send your first ping.

1. Create a team and copy your secret

  1. Sign up at opshift.io/register and create a team during onboarding.
  2. Open Settings → Webhook Secret. Copy the 64-character hex string and store it somewhere safe — it is shown in full only once.
  3. Export it in your environment as OPSHIFT_SECRET. Every signed request to the API uses this value.

2. Create a monitor

From the dashboard, open Monitors → New monitor. Pick an interval (how often you expect to ping) and a grace period (how late a ping can be before the monitor flips to down). When you save it, you will get a ping token — a short URL-safe string. Copy it.

3. Send your first ping

Pick your stack:

typescript
import { OpShift } from "@opshift/sdk";
 
const opshift = new OpShift({
  secret: process.env.OPSHIFT_SECRET!,
});
 
await opshift.ping("your-ping-token", { status: "up" });
python
import os
from opshift import OpShift
 
opshift = OpShift(secret=os.environ["OPSHIFT_SECRET"])
 
opshift.ping("your-ping-token", status="up")
bash
# The simplest case (no body) works too, but for signed requests
# the SDKs are recommended — see /docs/api/authentication.
curl -X POST https://www.opshift.io/api/ping/your-ping-token

Refresh the monitor in the dashboard — the status flips to up and the first ping shows up in the activity timeline.

4. Trigger your first alert

Monitors are passive. To raise an incident from your code — a failed deploy, a bad migration, a third-party outage — create a Webhook from Channels → Webhooks and copy its URL identifier.

typescript
await opshift.alert("your-webhook-url", {
  title: "Deployment failed",
  severity: "sev1",
  metadata: { commit: "a1b2c3", environment: "production" },
});

What just happened?

Both calls signed your request body with HMAC-SHA256 using OPSHIFT_SECRET, sent it to OpShift, and received a structured response. The ping landed in your monitor's state machine; the alert routed through any matching filter rules, notification policies, and on-call schedule to whoever is on shift.

Next steps

  1. Read Monitors to understand intervals, grace periods, and flap detection.
  2. Read Alerts & webhooks to learn how grouping, reopen detection, and filter rules reduce noise.
  3. Set up a Slack workspace from Integrations so alerts land where your team already lives.