DEV Community

Vigilmon
Vigilmon

Posted on

How to Monitor Your Vercel Deployment with Vigilmon

How to Monitor Your Vercel Deployment with Vigilmon

Vercel makes deploying Next.js, Nuxt, and SvelteKit apps effortless. But "deployed" doesn't mean "working" — a successful deployment can still serve a broken app if an environment variable is missing, an edge function times out, or a revalidation fails. Vigilmon monitors your live Vercel deployment from the outside.

What Can Go Wrong on Vercel?

  • Environment variable missing — app deploys but throws 500 at runtime
  • Edge function timeoutmaxDuration exceeded, returns 504
  • ISR revalidation failure — stale pages silently served after content updates
  • Custom domain misconfiguration — DNS not pointing to Vercel, CNAME missing
  • Serverless function cold start — first request after inactivity times out
  • Vercel platform incident — edge network degraded in specific regions

Setting Up Monitoring for a Vercel Deployment

1. Production URL

https://yourapp.vercel.app
Enter fullscreen mode Exit fullscreen mode

or your custom domain:

https://yourproduct.com
Enter fullscreen mode Exit fullscreen mode

Vigilmon setup:

  1. URL: production URL
  2. Expected status: 200
  3. Keyword: a string that appears on your homepage
  4. SSL monitoring: enabled (Vercel handles certs, but your custom domain cert needs tracking)
  5. Interval: 5 minutes

2. API Routes Health Check

Add a dedicated health route to your Next.js app:

// app/api/health/route.ts (Next.js App Router)
export async function GET() {
  return Response.json({ 
    status: 'ok',
    timestamp: new Date().toISOString()
  });
}

// Or pages/api/health.ts (Pages Router)
export default function handler(req, res) {
  res.status(200).json({ status: 'ok' });
}
Enter fullscreen mode Exit fullscreen mode

Monitor this separately:

  • URL: https://yourproduct.com/api/health
  • Expected status: 200
  • Keyword: "ok"
  • Interval: 2 minutes

3. Deep Health Check (with DB)

For a full-stack check, make your health route validate database connectivity:

// app/api/health/route.ts
import { db } from '@/lib/db';

export async function GET() {
  try {
    await db.execute('SELECT 1');
    return Response.json({ status: 'ok', db: 'connected' });
  } catch (e) {
    return Response.json({ status: 'error', db: 'failed' }, { status: 500 });
  }
}
Enter fullscreen mode Exit fullscreen mode

4. Edge Function Check

If you use Vercel Edge Functions, add a lightweight edge route and monitor it:

// app/api/edge-health/route.ts
export const runtime = 'edge';

export async function GET() {
  return Response.json({ status: 'ok', runtime: 'edge' });
}
Enter fullscreen mode Exit fullscreen mode

URL: https://yourproduct.com/api/edge-health

This catches edge runtime issues independently from serverless function issues.

Monitoring Preview Deployments

Vercel creates a unique URL for every deployment:

https://yourapp-{DEPLOYMENT_ID}.vercel.app
Enter fullscreen mode Exit fullscreen mode

For staging environments, add a stable preview URL monitor:

https://yourapp-git-staging-yourorg.vercel.app
Enter fullscreen mode Exit fullscreen mode

This monitors your staging branch preview URL, which Vercel keeps stable.

ISR Content Freshness Check

For Next.js apps using Incremental Static Regeneration, monitor content freshness:

  1. Add a monitor for a page that uses revalidate
  2. Enable keyword monitoring for a string unique to recently published content
  3. If the keyword disappears, ISR may have stopped revalidating

Monitoring Vercel's Infrastructure

Vercel publishes status at https://www.vercel-status.com. Monitor their API:

https://www.vercel-status.com/api/v2/summary.json
Enter fullscreen mode Exit fullscreen mode

Keyword check: "All Systems Operational".

Alert Configuration

For production (revenue-generating):

  • Main URL: alert on 1 failure, PagerDuty
  • Health endpoint: alert on 2 failures (filter cold starts)
  • DB health: alert on 1 failure

For staging:

  • Slack notification only, 3 consecutive failures

Vercel CLI Integration for Post-Deploy Checks

In your CI/CD pipeline, run a quick smoke test after deployment:

# In your GitHub Actions workflow
- name: Smoke test production
  run: |
    sleep 30  # Wait for deployment to stabilize
    curl -f https://yourproduct.com/api/health || exit 1
Enter fullscreen mode Exit fullscreen mode

This catches broken deployments before Vigilmon's next scheduled check.

Summary

Monitor URL What It Catches
Production yourproduct.com Full site down, DNS failure
API health /api/health Serverless functions broken
Edge health /api/edge-health Edge runtime failure
Staging app-git-staging.vercel.app Breaking changes in staging
Vercel status vercel-status.com/api/... Platform incidents

Monitor your Vercel deployment with Vigilmon — free plan available.


Vigilmon — uptime monitoring with multi-region checks and instant alerts.

Top comments (0)