tutorial

Monitoring Dockge with Vigilmon

Dockge is a self-hosted Docker Compose manager — and losing its dashboard means losing visibility into every stack it manages. Here's how to monitor Dockge's web UI, Docker socket connection, and real-time WebSocket terminal with Vigilmon.

Dockge is a self-hosted web UI for managing Docker Compose stacks. It runs on port 5001, connects to the Docker socket to control containers, and provides a real-time terminal WebSocket so you can watch deploy logs in-browser. When Dockge is down, you lose visibility into every Docker Compose stack on your server — and you lose the ability to bring them back up through the UI. Vigilmon keeps an eye on Dockge's web dashboard, Docker socket connectivity, and WebSocket service so a management plane failure doesn't catch you off guard.

What You'll Set Up

  • Web dashboard availability monitor
  • Docker socket connectivity health check
  • Docker Compose deployment pipeline health
  • Stack status polling service monitor
  • Real-time terminal WebSocket service monitor

Prerequisites

  • Dockge installed and running (default port 5001)
  • Docker daemon running with /var/run/docker.sock accessible to Dockge
  • A free Vigilmon account

Step 1: Monitor the Dockge Web Dashboard

Dockge's entire interface is a single-page app served by its Node.js/Bun backend. If this goes down, you have no management UI:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter the URL: https://dockge.yourdomain.com (or http://your-server:5001 for direct access).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

If you reverse-proxy Dockge behind nginx or Caddy, use the public URL. Confirm the proxy is up and the Dockge backend is both responding — the monitor catches either failure.

Verify the endpoint:

curl -I http://your-server:5001
# HTTP/1.1 200 OK
# content-type: text/html

Step 2: Monitor Docker Socket Connectivity

Dockge reads and writes Docker state via /var/run/docker.sock. If the Docker daemon stops or the socket permissions change, Dockge's UI will appear online but every stack operation will fail silently or with an opaque error.

Add a heartbeat that confirms the Docker socket is working from the host:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to 5 minutes.
  3. Copy the heartbeat URL: https://vigilmon.online/heartbeat/abc123.
  4. On your Dockge host, add a cron job:
# /etc/cron.d/dockge-docker-health
*/5 * * * * root \
  docker info > /dev/null 2>&1 && \
  curl -s https://vigilmon.online/heartbeat/abc123

This cron fires every 5 minutes. If docker info succeeds (meaning the Docker daemon is reachable and the socket is healthy), it pings Vigilmon. If Docker is down or the socket is inaccessible, the ping never arrives and Vigilmon alerts after the expected interval passes.


Step 3: Monitor Docker Compose Deployment Pipeline Health

Dockge uses docker compose to deploy, stop, and restart stacks. Confirm the CLI is functional alongside the daemon:

Extend the previous heartbeat script:

#!/bin/bash
# /usr/local/bin/dockge-health-check.sh

# Check Docker daemon
if ! docker info > /dev/null 2>&1; then
  exit 1
fi

# Check docker compose CLI (v2 plugin or standalone)
if ! docker compose version > /dev/null 2>&1; then
  exit 1
fi

# Check Dockge web UI
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5001)
if [ "$HTTP_STATUS" != "200" ]; then
  exit 1
fi

# All checks passed — ping heartbeat
curl -s https://vigilmon.online/heartbeat/abc123

Update the cron entry to call this script:

*/5 * * * * root /usr/local/bin/dockge-health-check.sh

This single heartbeat now confirms: Docker daemon alive, docker compose CLI available, and Dockge web UI responding.


Step 4: Monitor the Stack Status Polling Service

Dockge polls Docker to keep its UI's stack status current. If this polling breaks — due to a resource-exhausted Docker daemon or a Dockge crash loop — the UI will show stale stack states. This is a subtle failure mode: the web UI loads, but the data it displays is wrong.

Monitor Dockge's API endpoint that serves stack status:

  1. In Vigilmon, add an HTTP / HTTPS monitor.
  2. URL: http://your-server:5001/api/stacks (check your Dockge version's API — the path may vary).
  3. Set Expected HTTP status to 200 or 401 (depending on whether the API requires authentication).
  4. Set Check interval to 2 minutes.
  5. Click Save.

If Dockge doesn't expose a public stacks API without authentication, monitor the socket.io or WebSocket connection path instead (see Step 5), which Dockge uses for real-time stack updates.


Step 5: Monitor the Real-Time Terminal WebSocket Service

Dockge's "terminal" feature streams live docker compose output to the browser via WebSocket. If this WebSocket connection is broken, deploy logs won't stream and users will think deploys are hanging.

Add a TCP port monitor as a proxy for WebSocket availability:

  1. In Vigilmon, click Add MonitorTCP Port.
  2. Enter your Dockge host's IP or domain.
  3. Set Port to 5001.
  4. Set Check interval to 1 minute.
  5. Click Save.

A healthy TCP connection on port 5001 confirms the Bun/Node.js process is accepting connections. Pair this with the HTTP monitor from Step 1: if TCP is up but HTTP returns an error, the process is up but the app-level routing is broken.

For deeper WebSocket monitoring, use a cron heartbeat with a WebSocket probe script:

#!/bin/bash
# Probe WebSocket upgrade on Dockge's socket.io path
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
  -H "Connection: Upgrade" \
  -H "Upgrade: websocket" \
  -H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \
  -H "Sec-WebSocket-Version: 13" \
  http://localhost:5001/socket.io/?EIO=4&transport=websocket)

# 101 or 400 both indicate an active WebSocket handler
if [ "$RESPONSE" = "101" ] || [ "$RESPONSE" = "400" ]; then
  curl -s https://vigilmon.online/heartbeat/WEBSOCKET_HEARTBEAT_ID
fi

Run every 5 minutes from cron to confirm the WebSocket handler is alive.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack or email.
  2. Set Consecutive failures before alert to 2 on the web dashboard monitor.
  3. Set it to 1 on the Docker socket heartbeat — if Docker is down, every stack Dockge manages is at risk.
  4. Create a maintenance window before updating Dockge or restarting Docker to avoid false alerts during planned downtime.

Consider setting up a second, independent Vigilmon alert channel for the Docker socket heartbeat — route it to PagerDuty or on-call if Docker daemon failures are business-critical for your stack.


Summary

| Monitor | Target | What It Catches | |---|---|---| | Web dashboard | http://your-server:5001 | Dockge process crash, reverse proxy failure | | TCP port | :5001 | Network-level process failure | | Docker socket heartbeat | Heartbeat URL | Docker daemon down, socket permission change | | Stack status API | /api/stacks | Polling service failure, stale UI data | | WebSocket heartbeat | Heartbeat URL | Terminal stream broken, socket.io failure |

Dockge is the control plane for your Docker Compose stacks — when it goes down, you can still SSH in and run docker compose manually, but you've lost the convenience layer. More importantly, a degraded Docker daemon or socket connectivity issue that causes Dockge errors is often a leading indicator of broader container infrastructure problems. Vigilmon's layered monitoring catches these early, before a management plane failure cascades into a service outage.

Monitor your app with Vigilmon

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

Start free →