Skip to main content

1. Install and initialize

npm install -g @griffin-app/griffin
griffin init

2. Create a monitor file

Create a __griffin__/ directory and add a monitor file:
mkdir -p __griffin__
Create __griffin__/health-check.ts:
import { createMonitorBuilder, GET, Json, Assert, Frequency } from "@griffin-app/griffin";

const monitor = createMonitorBuilder({
  name: "health-check",
  frequency: Frequency.every(1).minute(),
})
  .request("check", {
    method: GET,
    base: "https://api.example.com",
    response_format: Json,
    path: "/health",
  })
  .assert((state) => [
    Assert(state["check"].status).equals(200),
  ])
  .build();

export default monitor;
Replace https://api.example.com with your API’s URL.

3. Run locally

griffin test
Griffin discovers all monitor files in __griffin__/ directories and executes them. You’ll see the results for each monitor — which requests were made, whether assertions passed, and timing information.

4. Deploy to the hub

Once your monitors are working locally, deploy them for continuous monitoring:
# Authenticate (Cloud)
griffin auth login

# Or connect to a self-hosted hub
griffin auth connect --url https://your-hub.example.com --token YOUR_TOKEN

# Preview what will change
griffin plan

# Deploy
griffin apply
Your monitors are now running on a schedule. View results with:
griffin runs
griffin metrics

Next steps