Payload CMS v3 is a headless CMS built on Next.js that runs the admin panel, REST API, and GraphQL API all in one Node.js process. When it goes down, your editors can't work and your front-end content API breaks. Here's how to monitor Payload CMS v3 with Vigilmon.
Payload CMS v3 Architecture
Payload v3 runs as a Next.js app. That means:
-
Admin panel —
/admin -
REST API —
/api/{collection-slug} -
GraphQL —
/api/graphql - Health — no built-in health route (but easy to add)
The cleanest approach is to add a dedicated health route and monitor that.
Adding a Health Route
Create a simple route handler in your Payload Next.js app:
// app/api/health/route.ts
import { NextResponse } from 'next/server'
import { getPayload } from 'payload'
import configPromise from '@payload-config'
export async function GET() {
try {
const payload = await getPayload({ config: configPromise })
// Optionally do a simple DB check
await payload.count({ collection: 'users', where: {} })
return NextResponse.json({ status: 'ok', timestamp: Date.now() })
} catch (err) {
return NextResponse.json({ status: 'error' }, { status: 503 })
}
}
This health check verifies both the Next.js server and the database connection are alive.
Simpler Alternative: Monitor the Admin Panel
If you don't want to add code, just monitor the admin login page:
URL: https://your-payload-app.com/admin
Expected status: 200
If /admin returns 200, Payload is running. This works well for quick setup.
Configuring Vigilmon
- Sign up at vigilmon.online
- Create a new monitor:
| Setting | Value |
|---|---|
| URL | https://your-payload-app.com/api/health |
| Method | GET |
| Interval | 60 seconds |
| Expected status | 200 |
| Keyword check | "ok" |
- Add your alert email.
- Hit Save.
Monitoring the REST API Directly
For content-critical apps, add a second monitor to check the actual content API:
URL: https://your-payload-app.com/api/posts?limit=1
Method: GET
Expected status: 200
Keyword: "docs"
The REST API returns { "docs": [...], "totalDocs": N }. If the keyword docs appears, your content API is serving.
Environment-Specific Monitoring
Self-hosted (VPS/Docker):
HEALTHCHECK --interval=30s --timeout=10s \
CMD curl -f http://localhost:3000/api/health || exit 1
Vercel or cloud deployment:
Use the public URL directly — no changes needed. Vigilmon hits your production URL from external servers.
What Breaks When Payload Goes Down
- Editorial team can't publish, edit, or approve content
- Front-end apps using the REST or GraphQL API start returning stale or empty content
- If using Payload for authentication, login breaks for end users
- Scheduled tasks and hooks stop firing
Alerting Strategy
For a content team:
- Email alert to the tech lead (free on Vigilmon)
-
Slack webhook to
#cms-alertsso editors can report it themselves
Set a 2-minute alert delay to avoid false positives from brief restarts during deploys.
Summary
Payload CMS v3 monitoring in 3 steps:
- Add
/api/healthroute (or use/adminas a proxy check) - Create Vigilmon monitor pointing at it
- Set up email or Slack alert
Your editorial team stays productive and you catch outages before they become content emergencies.
Top comments (0)