How to Monitor Your Payload CMS Application with Vigilmon
Payload CMS is the modern, TypeScript-first headless CMS built for developers. Unlike traditional CMSs, Payload runs as a Node.js application — it's your database, admin UI, and API all in one. That makes it powerful, bu
Payload CMS is the modern, TypeScript-first headless CMS built for developers. Unlike traditional CMSs, Payload runs as a Node.js application — it's your database, admin UI, and API all in one. That makes it powerful, but it also means you're responsible for its uptime. If Payload goes down, your content delivery stops, your editors can't publish, and your frontend goes dark.
This guide shows you how to monitor your Payload CMS application with Vigilmon so you're always the first to know when something breaks.
What Can Go Wrong with Payload CMS?
Payload CMS failure modes include:
- Database connectivity issues: Payload relies on MongoDB or PostgreSQL — if the database is unreachable, the CMS and API stop working
- Server crashes: Unhandled errors in custom hooks, access control functions, or field validations
- Memory exhaustion: Large file uploads or complex collection queries can spike memory
- Deployment issues: A bad build or missing environment variables cause startup failures
- Admin UI inaccessibility: The editor panel is down while the API might still be up (or vice versa)
External monitoring gives you visibility into all of these from the outside.
Setting Up Payload CMS Monitoring with Vigilmon
Step 1: Use Payload's Built-in Health Endpoint
Payload CMS includes a built-in health check endpoint at /api/health (or the path you configure for the REST API). This endpoint returns a 200 status when the server is running.
However, this only checks if the Node.js process is alive — not whether the database is connected. For more comprehensive monitoring, add a custom health endpoint.
Step 2: Add a Custom Health Check Endpoint
In your Payload config or Express app, add a route that verifies the database connection:
// server.ts (custom Payload server)
import express from 'express';
import payload from 'payload';
const app = express();
// Custom health endpoint
app.get('/health', async (req, res) => {
try {
// Attempt a lightweight Payload query to verify DB connectivity
await payload.find({
collection: 'users',
limit: 1,
depth: 0,
});
res.status(200).json({ status: 'healthy', cms: 'payload' });
} catch (error) {
res.status(503).json({
status: 'unhealthy',
error: error instanceof Error ? error.message : 'DB error'
});
}
});
await payload.init({
secret: process.env.PAYLOAD_SECRET,
express: app,
});
app.listen(3000);
This approach verifies that:
- The Node.js process is running
- The Payload ORM can connect to your database
- Queries are executing successfully
Step 3: Sign Up for Vigilmon
Go to vigilmon.online. The free tier gives you 10 monitors with 3-minute check intervals — no credit card required.
Step 4: Add an HTTP Monitor
- Click Add Monitor in the Vigilmon dashboard
- Select HTTP monitor type
- Enter your health URL:
https://cms.yourdomain.com/health - Set expected status code: 200
- Enable multi-region checks (US, EU, AP)
- Set your check interval
Step 5: Monitor the Payload Admin UI Separately
Add a second monitor targeting the admin panel URL: https://cms.yourdomain.com/admin
This catches issues where the API is healthy but the admin UI build is broken or the static assets aren't serving correctly. Your editors will thank you.
Step 6: Configure Alerts
Set up your preferred alert channels:
- Email: Immediate notification to yourself or your team
- Slack: Post to your content team's channel when the CMS goes down
- Discord: Great for developer teams
- PagerDuty: For mission-critical CMS deployments with on-call requirements
- Webhooks: Trigger automated restarts or notifications to your frontend team
Key Metrics to Monitor
| Monitor | What It Catches |
|---|---|
/health endpoint |
Database connectivity, server crashes |
/admin endpoint |
Admin UI availability for editors |
| Response time trend | Performance degradation before full failure |
| SSL certificate | Ensure custom domain certificate is valid |
Alert Configuration Tips
Notify your content team separately: Set up a Slack or email alert that notifies editors when the admin UI is down. They often notice downtime before developers do (through failed publish attempts), but they shouldn't have to report it manually.
Response time thresholds: Payload with a cold database connection can take several seconds to respond. Set a response time alert (e.g., > 5 seconds) to catch degraded performance early.
Environment separation: Run separate Vigilmon monitors for your staging and production Payload instances. Catch DB migration issues in staging before they hit production.
Heartbeat Monitors for Payload Background Jobs
If you use Payload's local API or custom scripts for background tasks (e.g., scheduled content publishing, image processing, search indexing), use Vigilmon's heartbeat monitor to verify they run on schedule. Your script pings a unique Vigilmon URL on completion; if the ping stops arriving, you're alerted immediately.
Why Not Just Rely on Your Host's Monitoring?
Hosting platforms like Railway, Render, Fly.io, and DigitalOcean App Platform provide basic process monitoring — but they only tell you if the container is running, not whether your Payload CMS is actually serving requests successfully. Vigilmon checks from the outside, the same way your users and editors experience the CMS.
Get Started
Your content team's productivity depends on Payload CMS being available. Set up monitoring at vigilmon.online in under 5 minutes — it's free to start with 10 monitors on the free tier.
Paid plans start at just $6/month for higher-frequency checks and more monitors. Don't let a database blip turn into an hours-long editor outage.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.