tutorial

Monitoring Docmost with Vigilmon

Docmost is a self-hosted collaborative wiki — here's how to monitor its web UI, health endpoint, PostgreSQL and Redis dependencies, SSL certificates, and real-time collaboration uptime with Vigilmon.

Docmost is a self-hosted, open-source collaborative wiki and documentation platform. It replaces tools like Confluence or Notion with a platform you control — but that also means you're responsible for keeping it online. A silent database failure or Redis outage can break real-time collaboration and leave your team unable to access documentation at the worst possible moment. Vigilmon adds an independent external monitoring layer that watches Docmost's web UI, health endpoint, and infrastructure dependencies so you know before your team does.

What You'll Set Up

  • HTTP uptime monitor for the Docmost web UI
  • Health endpoint check to verify API availability
  • PostgreSQL and Redis connectivity validation via the health endpoint
  • SSL certificate expiry alerts
  • Real-time collaboration service availability check

Prerequisites

  • Docmost deployed and accessible (typically behind a reverse proxy on port 443/80)
  • PostgreSQL and Redis running and connected to Docmost
  • A free Vigilmon account

Step 1: Monitor the Docmost Web UI

The Docmost web interface is the primary entry point for your team. Add an uptime monitor to catch any availability issues immediately:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Docmost URL: https://docs.yourdomain.com (or http://your-server-ip:3000 if running without a reverse proxy).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

Docmost is typically deployed behind a reverse proxy (nginx or Caddy). Use the proxied domain here — that way you're testing the full stack, including TLS termination and proxy routing, not just the Node.js process.


Step 2: Check the Health Endpoint

Docmost exposes a health endpoint that verifies the application layer is responsive. This is a faster, lighter check than loading the full web UI and gives a direct signal that the API — which handles document reads, writes, and collaboration — is available:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: https://docs.yourdomain.com/api/health (or the root / if Docmost doesn't expose a dedicated health route in your version).
  3. Set Check interval to 2 minutes.
  4. Set Expected HTTP status to 200.
  5. Click Save.

Confirm the endpoint before setting up the monitor:

curl -s -o /dev/null -w "%{http_code}" https://docs.yourdomain.com/api/health
# 200

If Docmost returns health data in the response body, add a Expected response body contains check for a key string — this catches partial startup states where the server responds 200 but hasn't fully initialized its database connection.


Step 3: PostgreSQL and Redis Connectivity

Docmost requires both PostgreSQL (for document storage and user data) and Redis (for real-time collaboration state and session management). Either dependency going down degrades or breaks Docmost in ways that don't always produce obvious UI errors.

The /api/health endpoint (Step 2) typically reports on these dependencies. If Docmost's health check returns non-200 when PostgreSQL or Redis is unavailable, your existing health monitor already covers this. To make it explicit:

  1. Add a second HTTP monitor targeting /api/health.
  2. Under Advanced, set Expected response body contains to a string that indicates full health (e.g., "status":"ok" or "database":"connected" — check your Docmost version's response format).
  3. Set the check interval to 2 minutes.
  4. Fire alerts on 1 failed check — database failures escalate quickly.

For direct PostgreSQL reachability (if Docmost's health endpoint doesn't cover it), run a connectivity check from your server:

# Add to cron — ping Vigilmon only if PostgreSQL is reachable
*/2 * * * * pg_isready -h localhost -U docmost && curl -s https://vigilmon.online/heartbeat/db-check-url

This gives you a distinct alert for database failures separate from application-layer failures.


Step 4: SSL Certificate Alerts

A lapsed TLS certificate locks your entire team out of Docmost immediately. Browser hard-fail behavior on certificate errors means no workaround for end users. Add certificate monitoring with plenty of lead time:

  1. Open the web UI monitor created in Step 1.
  2. Enable Monitor SSL certificate.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

For Docmost deployments using Caddy as a reverse proxy, Caddy handles automatic renewal — but renewal failures are silent. This check confirms that the certificate renewal is actually working, not just that Caddy is configured to attempt it.


Step 5: Real-Time Collaboration Availability

Docmost's real-time collaboration relies on WebSocket connections for live document editing. If the WebSocket layer is degraded, users see stale content and lose collaborative editing without an obvious error message.

The web UI monitor from Step 1 confirms the HTTP layer is healthy, but WebSocket connectivity requires a separate check. Add a heartbeat monitor driven from your Docmost server:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Name it Docmost — Collaboration Service.
  3. Set the expected ping interval to 5 minutes.
  4. Copy the heartbeat URL: https://vigilmon.online/heartbeat/abc123.

Ping from a server-side script that validates the WebSocket endpoint:

#!/bin/bash
# Check if Docmost WebSocket upgrade endpoint responds
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
  -H "Upgrade: websocket" \
  -H "Connection: Upgrade" \
  https://docs.yourdomain.com/collaboration)
# 101 Switching Protocols = WebSocket accepted; 200/400 = HTTP layer alive
if [ "$STATUS" -ge 100 ] && [ "$STATUS" -lt 500 ]; then
  curl -s https://vigilmon.online/heartbeat/abc123
fi

Add this to cron:

*/5 * * * * /home/user/check-docmost-collab.sh

If the collaboration endpoint starts returning 5xx errors or timing out, the heartbeat goes silent and Vigilmon alerts you within one check interval.


Step 6: Alert Routing

Documentation downtime disrupts your whole team's workflow. Route Docmost alerts to a visible, fast channel:

  1. Open each monitor and go to Notifications.
  2. For the web UI and health endpoint monitors, fire on 1 failed check — these are shared infrastructure, not personal tools.
  3. For the collaboration heartbeat monitor, allow a 1-check grace period to absorb transient network glitches.
  4. Route to Slack #ops-alerts, PagerDuty, or email depending on your team's on-call structure.

What You've Built

With this setup, Vigilmon independently monitors the full Docmost stack: the web UI, the API health endpoint (which validates PostgreSQL and Redis connectivity), SSL certificate validity, and the real-time collaboration WebSocket layer. Your team gets documentation access restored before a Slack thread about "Docmost is down" even starts.

Get started at vigilmon.online.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →