DEV Community

Vigilmon
Vigilmon

Posted on

How to Monitor Your Directus API with Vigilmon

How to Monitor Your Directus API with Vigilmon

Directus is an open-source data platform that wraps any SQL database with a REST and GraphQL API. If your frontend, mobile app, or automation depends on the Directus API, you need uptime monitoring. This guide shows how to monitor Directus with Vigilmon.

Directus Health Check Endpoint

Directus includes a built-in health check at /server/health:

GET https://your-directus.com/server/health
Expected response: 200 {"status": "ok"}
Enter fullscreen mode Exit fullscreen mode

This endpoint checks the Directus server process, database connectivity, cache, and storage — all in one call.

Step 1: Set Up Vigilmon for Directus

  1. Sign up at vigilmon.online (free, no credit card)
  2. Add Monitor → enter https://your-directus.com/server/health
  3. Expected status: 200
  4. Check interval: 5 minutes (free) or 1 minute (paid)
  5. Enable multi-region consensus: 2+ regions must confirm failure
  6. Optionally add expected body text: "status":"ok"

Step 2: Monitor the Collections API

The health endpoint verifies infrastructure, but a specific collection could have permission issues. Add a second monitor for a public collection:

URL: https://your-directus.com/items/articles?limit=1
Headers: Authorization: Bearer your-public-token
Expected: 200
Enter fullscreen mode Exit fullscreen mode

Step 3: Directus on Cloud Platforms

Railway

# railway.json - ensure health check is configured
{
  "healthcheckPath": "/server/health",
  "healthcheckTimeout": 300
}
Enter fullscreen mode Exit fullscreen mode

DigitalOcean App Platform

Set the health check path to /server/health in App Platform settings.

Self-Hosted (Docker)

# docker-compose.yml health check
healthcheck:
  test: ["CMD", "wget", "-qO-", "http://localhost:8055/server/health"]
  interval: 30s
  timeout: 10s
  retries: 3
Enter fullscreen mode Exit fullscreen mode

Vigilmon monitors externally; Docker health check restarts the container if it fails.

Understanding the Directus Health Response

{
  "status": "ok",
  "releaseId": "10.x.x",
  "checks": {
    "database": [{"status": "pass"}],
    "cache": [{"status": "pass"}],
    "storage": [{"status": "pass"}]
  }
}
Enter fullscreen mode Exit fullscreen mode

If database connectivity fails, status changes to warn or error and the HTTP status becomes 503. Vigilmon catches this automatically.

Common Directus Failure Scenarios

Failure Health Response Vigilmon Catches?
Node.js crash No response / 502 ✅ Yes
Database connection lost 503, status: error ✅ Yes
Storage provider down 503, status: warn ✅ Yes
Redis cache failure 200 with cache warn ⚠️ Partial
Permission misconfiguration Content returns 403 ✅ Yes (if monitoring item endpoint)

Webhook Notification Setup

{
  "url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
  "events": ["down", "up"]
}
Enter fullscreen mode Exit fullscreen mode

Or integrate with PagerDuty for on-call alerting.

Public Status Page

Share your status page URL with your content editors:

https://vigilmon.online/status/your-directus
Enter fullscreen mode Exit fullscreen mode

Reduces the "is the CMS down?" questions from non-technical team members.

Conclusion

Directus's /server/health endpoint makes monitoring simple. With Vigilmon:

  • ✅ Built-in health endpoint covers database + cache + storage
  • ✅ Multi-region consensus prevents false alerts
  • ✅ Free tier: 5 monitors, no credit card
  • ✅ Public status page for your team

Start monitoring your Directus instance at vigilmon.online.

Top comments (0)