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
- Sign up at opshift.io/register and create a team during onboarding.
- Open Settings → Webhook Secret. Copy the 64-character hex string and store it somewhere safe — it is shown in full only once.
- Export it in your environment as
OPSHIFT_SECRET. Every signed request to the API uses this value.
The webhook secret authenticates every ping and alert from your infrastructure. Store it in your secret manager, never commit it. If it leaks, rotate it from the same settings page — OpShift accepts the old secret for a grace window so deploys don't break.
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:
import { OpShift } from "@opshift/sdk";
const opshift = new OpShift({
secret: process.env.OPSHIFT_SECRET!,
});
await opshift.ping("your-ping-token", { status: "up" });import os
from opshift import OpShift
opshift = OpShift(secret=os.environ["OPSHIFT_SECRET"])
opshift.ping("your-ping-token", status="up")# 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-tokenRefresh 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.
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
- Read Monitors to understand intervals, grace periods, and flap detection.
- Read Alerts & webhooks to learn how grouping, reopen detection, and filter rules reduce noise.
- Set up a Slack workspace from Integrations so alerts land where your team already lives.