Uptime monitoring setup
One-time setup. Configures an external uptime monitor (UptimeRobot, BetterStack, Pingdom, etc.) to watch the HiveJournal backend's public
/healthendpoint and alert on outage. The on-platform work is done — what remains is a few clicks in whichever monitor service you pick.
What the /health endpoint returns
The public, no-auth backend health endpoint at https://hivejournalbackend-production.up.railway.app/health returns:
{
"status": "ok",
"timestamp": "2026-04-15T18:30:00.000Z",
"started_at": "2026-04-15T17:45:12.000Z",
"commit_sha": "abc1234..."
}
| Field | Meaning |
|---|---|
status | Always "ok" if the process is running. (For deeper DB-roundtrip checks, see /api/admin/health — but that's auth-gated and not appropriate for an external monitor.) |
timestamp | Server's current time, UTC. |
started_at | When the backend process last booted. A new value here means a deploy or restart. |
commit_sha | Railway's RAILWAY_GIT_COMMIT_SHA — the deployed commit. Useful for confirming a deploy actually shipped. |
Recommended monitor: BetterStack (formerly Better Uptime)
Best free tier (10 monitors, 30-second checks), good Slack/email integration, public status page included. Walkthrough:
- Sign up at https://uptime.betterstack.com (free tier).
- Create a monitor → "HTTP(s)" type:
- URL:
https://hivejournalbackend-production.up.railway.app/health - Check frequency: 1 minute (free tier ceiling) or 30 seconds (paid)
- Request method: GET
- Expected status code: 200
- Keyword to find:
"status":"ok"(catches the case where the endpoint returns 200 but with degraded JSON) - Regions: pick at least 2 (e.g., US-East + EU). Single-region false positives are common when AWS has a hiccup in one zone.
- Recovery period: 1 minute (prevents flapping)
- URL:
- Configure alerts:
- Email: your on-call address
- Optional: Slack webhook for a
#alertschannel - Escalation: alert immediately on first failure → re-alert after 10 minutes if unresolved
- Create a public status page (optional):
- Add the
/healthmonitor to it - Custom subdomain:
status.hivejournal.com(CNAME → BetterStack) - Auto-publish incidents from monitor failures
- Add the
- Subscribe to the status page via RSS or email so you see incidents alongside the alert email.
Alternative: UptimeRobot
Cheaper paid tier than BetterStack, slightly less polished UI, 5-minute free check frequency.
- Sign up at https://uptimerobot.com (free tier — 50 monitors).
- Add new monitor → HTTP(s):
- URL:
https://hivejournalbackend-production.up.railway.app/health - Monitoring interval: 5 minutes (free) or 1 minute (paid)
- Monitor SSL errors: on
- Keyword monitoring: enable, search for
"status":"ok"
- URL:
- Alert contacts: add your email + optional Slack webhook
- Public status page: free tier supports one, customise the subdomain.
Alternative: native Vercel monitoring
The frontend is on Vercel, so the simplest possible setup is just turning on Vercel's built-in monitoring for the /api/health route on the frontend (if you add one) or the existing routes. Two caveats:
- It only watches the frontend, not the Railway backend (which is the actual stateful service). Most outages worth alerting on are backend outages.
- Free plan limits.
If you want monitoring purely as a "did the deploy succeed" smoke test, Vercel's built-in is enough. For real uptime monitoring of the stateful backend, use BetterStack or UptimeRobot above.
Smoke-test workflow
After configuring the monitor:
- Visit
https://hivejournalbackend-production.up.railway.app/healthin a browser. Confirm you see the JSON. - Trigger a synthetic deploy via Railway (push a no-op commit) and confirm the monitor's "last checked" timestamp picks up the new
commit_shawithin ~5 minutes of the deploy completing. - Optionally: pause the Railway service for 60 seconds to deliberately trigger an alert. Confirms email + Slack delivery actually works. Resume it.
Cross-references
- The internal super-admin health page at /dashboard/admin/health is a richer view (DB latency, applied-vs-local migrations diff, commit SHA, Node version, uptime). External monitors should use
/health(no auth required), not/api/admin/health. - The endpoint is implemented at
apps/backend/src/index.ts(~line 88). If you need to add new fields to the response (e.g., a feature flag check), edit there — but keep the response shape backwards-compatible so existing monitors don't false-alarm.
Status
- ✅ Backend
/healthendpoint upgraded (started_at,commit_shaexposed). - ✅ Internal admin health page shipped at
/dashboard/admin/health. - ⏳ External monitor configuration — your action. Pick BetterStack and follow the steps above, takes ~10 minutes.