tutorial

Monitoring Cinny with Vigilmon

Cinny is a sleek Matrix web client — but when it goes down, your team loses their chat. Here's how to monitor web server availability, TLS certificates, Matrix homeserver connectivity, and static asset health with Vigilmon.

Cinny is a modern, community-focused Matrix web client built with React and TypeScript. It's served as a static web application — typically behind nginx or Caddy — and depends on an upstream Matrix homeserver (Synapse, Dendrite, or Conduit) to function. When any layer in that stack breaks, users see a blank screen or a connection error. Vigilmon lets you detect those failures before your users do, covering everything from TLS certificate expiry to Matrix API response times.

What You'll Set Up

  • Web server availability and HTTP response monitoring
  • TLS/HTTPS certificate expiry alerts
  • Static file serving latency checks
  • Matrix homeserver connectivity monitoring
  • Upstream Matrix API endpoint response time tracking
  • CORS configuration health verification
  • Cron heartbeat for build artifact validation scripts

Prerequisites

  • Cinny deployed and accessible at a public or internal HTTPS URL
  • nginx or Caddy serving the static build
  • The Matrix homeserver URL Cinny connects to (e.g. https://matrix.yourdomain.com)
  • A free Vigilmon account

Step 1: Monitor Web Server Availability

The first thing to check is whether nginx or Caddy is serving Cinny at all. Add a basic HTTP uptime monitor:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Cinny URL: https://cinny.yourdomain.com.
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

This checks that your web server is up and returning a valid response. If nginx crashes or Caddy fails to start after a reboot, this monitor fires immediately.


Step 2: Monitor TLS Certificate Expiry

Cinny is served over HTTPS, and an expired certificate makes the app completely inaccessible — browsers refuse to load the page. Enable certificate expiry monitoring on the same monitor:

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

A 21-day window gives you plenty of lead time if Let's Encrypt auto-renewal fails, Caddy's ACME challenge is blocked, or you manage certificates manually.


Step 3: Monitor Static File Serving Latency

Cinny loads a JavaScript bundle, CSS, and assets at startup. Slow serving degrades the first-load experience and can indicate disk I/O issues or misconfigured caching headers. Add a keyword monitor targeting the main bundle:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter your Cinny URL: https://cinny.yourdomain.com.
  3. Set Keyword must be present to cinny (matches the page title in index.html).
  4. Set Check interval to 5 minutes.
  5. Click Save.

You can also probe the JavaScript bundle directly for a stricter latency signal:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the path to the main JS chunk: https://cinny.yourdomain.com/static/js/main.<hash>.js.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.

Finding the bundle filename: inspect the Cinny build directory (/var/www/cinny/static/js/) or check your browser's DevTools Network tab on first load. Update this monitor after each Cinny upgrade when the hash changes.


Step 4: Monitor Matrix Homeserver Connectivity

Cinny is a client — it needs to reach its configured Matrix homeserver to do anything. If the homeserver goes down or becomes unreachable, Cinny shows a "failed to connect" error even though the web server is perfectly healthy. Monitor the homeserver's client-server API:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the homeserver's well-known URL: https://matrix.yourdomain.com/.well-known/matrix/client.
  3. Set Expected HTTP status to 200.
  4. Set Keyword must be present to m.homeserver (standard JSON field in the well-known response).
  5. Set Check interval to 1 minute.
  6. Click Save.

Also add a monitor for the Matrix client versions endpoint, which confirms the homeserver API itself is responding:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://matrix.yourdomain.com/_matrix/client/versions.
  3. Set Expected HTTP status to 200.
  4. Set Keyword must be present to versions.
  5. Set Check interval to 1 minute.

Step 5: Monitor Upstream Matrix API Response Times

Even if the homeserver is up, slow API response times translate directly into a sluggish Cinny experience — message sending lags, room lists load slowly, and the sync stream falls behind. Track the login endpoint as a representative API latency signal:

  1. Open the /_matrix/client/versions monitor from Step 4.
  2. Enable Response time alert.
  3. Set Alert if response time exceeds 2000 ms.
  4. Click Save.

For a more realistic end-user signal, also monitor the sync endpoint (note: this returns immediately with a timeout parameter, so it's a safe probe):

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://matrix.yourdomain.com/_matrix/client/v3/sync?timeout=0 (unauthenticated probe — will return 401 Unauthorized, which is still a valid API response).
  3. Set Expected HTTP status to 401.
  4. Enable Response time alert with a threshold of 3000 ms.
  5. Set Check interval to 2 minutes.

A 401 response confirms the API is active; a timeout or 502 means something is broken deeper in the stack.


Step 6: Verify CORS Configuration

Cinny makes cross-origin API calls to the Matrix homeserver from the browser. Broken CORS headers cause silent JavaScript errors that prevent login and message loading. Add a monitor that probes the CORS preflight path:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter your homeserver's base URL with a known API path: https://matrix.yourdomain.com/_matrix/client/versions.
  3. Under Custom request headers, add:
    • Origin: https://cinny.yourdomain.com
  4. Set Keyword must be present to Access-Control (matches the Access-Control-Allow-Origin response header).
  5. Set Check interval to 5 minutes.

If your Vigilmon plan does not support custom request headers for keyword matching against response headers, use a lightweight external script (see Step 7) to test CORS and report via a heartbeat.


Step 7: Heartbeat for Build Artifact Integrity

If you compile Cinny from source, a failed or corrupted build can silently serve a broken app. Use a scheduled script to verify the build output and ping Vigilmon on success:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set Expected ping interval to 1440 minutes (daily).
  3. Copy the heartbeat URL: https://vigilmon.online/heartbeat/your-token.

Create a verification script on your server:

#!/bin/bash
# /opt/scripts/verify-cinny-build.sh
CINNY_DIR="/var/www/cinny"
HEARTBEAT_URL="https://vigilmon.online/heartbeat/your-token"

# Check index.html exists and contains expected content
if grep -q "cinny" "$CINNY_DIR/index.html" 2>/dev/null; then
    # Check at least one JS bundle exists
    if ls "$CINNY_DIR/static/js/main."*.js 1>/dev/null 2>&1; then
        curl -s "$HEARTBEAT_URL" > /dev/null
    fi
fi

Add it to cron:

crontab -e
# Run daily at 6 AM
0 6 * * * /bin/bash /opt/scripts/verify-cinny-build.sh

If the build directory is empty, corrupted, or missing the index, the heartbeat ping is never sent and Vigilmon alerts after the expected interval.


Step 8: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add your preferred channel: email, Slack, Discord webhook, or PagerDuty.
  2. For the web server monitor (Step 1), set Consecutive failures before alert to 2 — a single blip from a web server restart should not page you.
  3. For the Matrix homeserver monitors (Steps 4–5), set Consecutive failures before alert to 1 — homeserver outages affect all Cinny users immediately.
  4. Group the homeserver monitors into an alert group in Vigilmon so you receive one notification when the homeserver goes down, not one per monitor.

Conclusion

With these monitors in place, you have full observability across Cinny's serving stack:

| Layer | Monitor | |---|---| | Web server | HTTP uptime on https://cinny.yourdomain.com | | TLS certificate | SSL expiry alert (21-day window) | | Static assets | Keyword check on index.html | | Matrix API | /_matrix/client/versions uptime + latency | | Sync endpoint | /_matrix/client/v3/sync?timeout=0 response time | | Build integrity | Cron heartbeat from artifact verification script |

When the web server goes down, your users can't load the app. When the Matrix homeserver goes down, your users can't send messages. Vigilmon catches both, so you're fixing the problem before your users are asking what's wrong in a different chat client.

Monitor your app with Vigilmon

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

Start free →