tutorial

Monitoring code-server with Vigilmon: Web IDE Availability, WebSocket Health & SSL Certificate Alerts

How to monitor code-server (VS Code in the browser) with Vigilmon — web UI availability, health endpoint checks, WebSocket connectivity, SSL certificates, and response time monitoring for IDE load performance.

code-server brings VS Code into the browser, turning any Linux server into a full cloud development environment. But a developer's workflow depends on it being available — and when code-server goes down, WebSocket connections drop, the editor freezes mid-session, and in-progress work can be lost. Vigilmon gives you external eyes on code-server's availability, health endpoint, WebSocket layer, and SSL certificate before any of those failures interrupt a coding session.

What You'll Build

  • An HTTP monitor on code-server's health endpoint
  • A web UI availability check that catches crashes and port failures
  • SSL certificate monitoring for your IDE domain
  • Response time tracking to catch slow IDE load times
  • A heartbeat that verifies the WebSocket upgrade path is alive

Prerequisites

  • code-server running (typically on port 8080 or behind a reverse proxy)
  • A domain or IP:port to reach your instance (HTTPS strongly recommended)
  • A free account at vigilmon.online

Step 1: Check code-server's Health Endpoint

code-server exposes a /healthz endpoint that returns a 200 with {"status":"alive"} when the server is running correctly:

curl https://code.yourdomain.com/healthz
# {"status":"alive"}

If you're running code-server without a reverse proxy, test the direct port:

curl http://localhost:8080/healthz

A non-200 response or a connection refused means code-server has crashed or is not yet fully started.


Step 2: Create the Health Monitor in Vigilmon

  1. Log in to VigilmonAdd Monitor → HTTP.
  2. URL: https://code.yourdomain.com/healthz
  3. Check interval: 60 seconds.
  4. Response timeout: 15 seconds (VS Code startup can be slow on low-memory servers).
  5. Expected status: 200.
  6. Keyword: alive (matches the JSON response body).
  7. Click Save.

This single monitor catches:

  • code-server process crashes
  • Port 8080 becoming unavailable
  • Reverse proxy routing failures
  • DNS resolution errors

Step 3: Monitor the Web UI Login Page

The /healthz endpoint is lightweight and doesn't exercise the full web serving stack. Add a second monitor that checks the actual login/landing page:

  1. Add Monitor → HTTP.
  2. URL: https://code.yourdomain.com/
  3. Expected status: 200.
  4. Keyword: code-server (present in the page title and HTML).
  5. Check interval: 120 seconds (less critical than health; reduces noise).

If the health endpoint passes but the web UI check fails, the issue is likely in Caddy/nginx routing or static asset serving rather than the code-server process itself.


Step 4: Monitor SSL Certificate for Your IDE Domain

code-server handles sensitive source code and credentials. A lapsed SSL certificate forces developers to either accept browser warnings or — worse — switch to unencrypted HTTP.

  1. Add Monitor → SSL Certificate.
  2. Domain: code.yourdomain.com
  3. Alert when expiry is within: 30 days.
  4. Alert again: 14 days, 7 days, 3 days.

If you use Let's Encrypt via Caddy or certbot, the 30-day threshold catches renewal failures before the certificate expires. Certificates for development tools are easy to overlook — Vigilmon ensures you're not surprised.


Step 5: Track IDE Load Response Time

A slow IDE is almost as bad as an unavailable one. code-server's initial page load involves serving a large JavaScript bundle, and on memory-constrained VPSes, load time can spike when the server is under pressure.

In your existing HTTP monitor for /healthz or /:

  1. Open the monitor settings → Response time alerts.
  2. Warn at: 3 seconds.
  3. Critical at: 8 seconds.

A spike in response time before a complete outage is a useful early warning signal. If load time trends upward over a week, your server may be running out of RAM and swapping to disk.


Step 6: Verify WebSocket Connectivity with a Heartbeat

code-server's live editing, terminal, and extension communication all run over WebSockets. If the WebSocket upgrade path breaks (often due to a misconfigured reverse proxy Upgrade header), the UI loads but all interactions silently fail.

Set up a cron-based heartbeat on the server itself:

#!/bin/bash
# /etc/cron.d/code-server-ws-heartbeat
# Runs every 5 minutes

# Check that the WebSocket upgrade path is available
# A 101 Switching Protocols or 400 (missing Upgrade header) both confirm the WS endpoint is live
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
  -H "Upgrade: websocket" \
  -H "Connection: Upgrade" \
  https://code.yourdomain.com/stable-v1/vscode-remote-resource 2>/dev/null)

if [ "$STATUS" != "000" ]; then
  curl -fsS -X POST https://vigilmon.online/api/heartbeat/YOUR-HEARTBEAT-ID
fi

Create a Heartbeat monitor in Vigilmon:

  1. Add Monitor → Heartbeat.
  2. Expected interval: 5 minutes.
  3. Grace period: 10 minutes.

If the heartbeat stops firing, the WebSocket path is broken or code-server itself is down.


Step 7: Configure Alerting

In Vigilmon under Settings → Notifications, configure your alert channels (email, Slack, webhook):

| Monitor | Trigger | First action | |---|---|---| | /healthz health check | Non-200 or keyword missing | systemctl restart code-server; check journalctl -u code-server | | Web UI availability | Non-200 | Check reverse proxy logs; verify static asset serving | | SSL certificate | < 30 days to expiry | Run certbot renew or check Caddy's ACME logs | | Response time | > 3 s | Check free -m; if swapping, add swap or upgrade RAM | | WebSocket heartbeat | Missed > 10 min | Restart code-server; check proxy Upgrade header pass-through |

Set alert after 2 consecutive failures for HTTP monitors to avoid false positives from brief network blips.


Common code-server Failure Modes and What Vigilmon Catches

| Scenario | Vigilmon monitor | |---|---| | code-server process OOM-killed | Health check fails within 60 s | | Reverse proxy drops WebSocket headers | Heartbeat stops | | Let's Encrypt certificate expires | SSL monitor alerts at 30 days | | Server swap thrashing → slow loads | Response time alert fires | | Port 8080 bound by another process after restart | Health check fails | | DNS misconfigured after server migration | Both HTTP and SSL monitors fire |


code-server turns a $5/month VPS into a portable development environment accessible from any browser — but only when it's actually running. A five-minute Vigilmon setup ensures you know immediately when your IDE goes down, when your SSL certificate needs renewal, or when your server is struggling under load. Keep your development environment as reliable as your production one.

Start monitoring code-server in under 5 minutes — register free at vigilmon.online.

Monitor your app with Vigilmon

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

Start free →