Directus is an open-source data platform and headless CMS that wraps any SQL database in a REST and GraphQL API. Whether you're running Directus on a VPS, Railway, or using Directus Cloud, you need uptime monitoring. Here's how to set it up with Vigilmon.
Directus Health Endpoint
Directus ships with a built-in health check endpoint:
GET /server/health
This returns a detailed health response:
{
"status": "ok",
"releaseId": "10.x.x",
"checks": {
"node:version": [{"status": "pass"}],
"env:version": [{"status": "pass"}],
"storage:local": [{"status": "pass"}],
"database": [{"status": "pass"}]
}
}
This is the perfect endpoint for Vigilmon to monitor — it checks Node.js, environment, storage, and database connectivity in one request.
Quick Setup
- Confirm your health endpoint works:
curl https://your-directus-instance.com/server/health
# Should return {"status":"ok",...}
Sign up at vigilmon.online (free tier covers 5 monitors)
Create a monitor:
| Setting | Value |
|---|---|
| URL | https://your-directus-instance.com/server/health |
| Method | GET |
| Interval | 60 seconds |
| Expected status | 200 |
| Keyword | "ok" |
- Add your email and save.
Done — Vigilmon now checks your Directus instance every 60 seconds.
Self-Hosted Directus (Docker)
If running Directus via Docker:
# docker-compose.yml
services:
directus:
image: directus/directus:latest
ports:
- "8055:8055"
environment:
KEY: 'your-secret-key'
SECRET: 'your-secret-secret'
DB_CLIENT: postgres
DB_HOST: database
DB_DATABASE: directus
DB_USER: directus
DB_PASSWORD: directus
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "http://localhost:8055/server/health"]
interval: 30s
timeout: 10s
retries: 3
The Docker healthcheck is for container orchestration. You still need Vigilmon for external alerting — internal healthchecks don't notify you, they just restart the container.
Monitoring Directus Behind a Reverse Proxy
If Directus is behind Nginx or Caddy, make sure the health endpoint is accessible:
Nginx config:
location /server/health {
proxy_pass http://directus:8055/server/health;
# Don't add auth here — health should be public
}
Caddy:
reverse_proxy /server/health directus:8055
Test from outside your network before adding to Vigilmon:
curl https://cms.yourdomain.com/server/health
Rate Limiting Considerations
Directus has built-in rate limiting. The health endpoint is typically exempt, but if you've configured aggressive rate limits, whitelist the check frequency:
# .env
RATE_LIMITER_ENABLED=true
RATE_LIMITER_POINTS=200
RATE_LIMITER_DURATION=60
Vigilmon makes one request per 60 seconds — well within any reasonable rate limit.
Monitoring Directus Cloud
For Directus Cloud instances, use your project URL:
https://your-project.directus.app/server/health
Since Directus Cloud manages infrastructure, focus your monitoring on:
- The health endpoint (catches application-level failures)
- A specific API route that queries your data (catches data layer issues)
Example data endpoint check:
URL: https://your-project.directus.app/items/posts?limit=1
Method: GET
Headers: Authorization: Bearer your-static-token
Expected status: 200
Use a static read-only API token for this check.
Setting Up a Read-Only Monitoring Token
Don't use your admin token for monitoring. Create a dedicated monitoring user:
- Directus Admin → Settings → Users → Create user
- Role: create a "Monitoring" role with read-only access to one collection
- Generate a static token for this user (User profile → Token)
Add this token to your Vigilmon monitor as a custom header:
Authorization: Bearer your-monitoring-token
What Breaks When Directus Goes Down
- CMS editors can't publish or update content
- Front-end apps get 502/503 errors on content API calls
- Webhooks stop firing (no content updates pushed to subscribers)
- File uploads fail
- Any app using Directus as an auth provider breaks login
Alerting Setup
For a content team:
- Email to the site administrator (free on Vigilmon)
-
Slack webhook to
#cms-statusfor larger teams
For API-dependent production apps, consider setting up a status page (Vigilmon paid) to communicate outages to stakeholders.
Summary
Directus monitoring checklist:
- [ ] Verify
/server/healthreturns{"status":"ok"} - [ ] Create Vigilmon monitor with keyword check for
"ok" - [ ] Set up email or Slack alert
- [ ] Optional: add second monitor using a read-only API token
Top comments (0)