tutorial

Monitoring Element Web and Matrix with Vigilmon

Element Web is the flagship open-source Matrix client — a React SPA that depends on your Matrix homeserver staying healthy. Here's how to monitor Element Web availability, Matrix homeserver delegation, SSL certificates, and Element Call signaling with Vigilmon.

Element Web (formerly Riot.im) is the most widely used Matrix protocol client — an open-source React single-page application that connects users to Matrix homeservers for decentralized, end-to-end encrypted messaging. When you self-host Element Web alongside a Synapse or Dendrite homeserver, your users depend on both the static app being served correctly and the homeserver remaining healthy. Vigilmon monitors both layers: Element Web's static app availability, the Matrix delegation endpoint, SSL certificates, and Element Call signaling when deployed.

What You'll Set Up

  • HTTP uptime monitor for the Element Web static app (index.html)
  • Monitor for the Element Web configuration endpoint (/config.json)
  • Matrix homeserver health check via Well-Known delegation (/.well-known/matrix/client)
  • SSL certificate expiry alerts for HTTPS Element Web deployments
  • Heartbeat monitoring for Element Call WebRTC signaling availability

Prerequisites

  • Element Web deployed and served over HTTPS (nginx, Caddy, or a static host)
  • A Matrix homeserver (Synapse, Dendrite, or similar) configured and running
  • A free Vigilmon account

Step 1: Monitor Element Web Static App Availability

Element Web is a static React app — it has no server-side process, but it requires a web server to serve it and a correct index.html to bootstrap. Monitor the root of your Element Web deployment:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Element Web URL: https://chat.yourdomain.com/.
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Under Keyword check, enter Element to confirm the correct app is being served (the page title includes this string).
  7. Click Save.

The keyword check prevents false negatives from a web server that returns 200 with an error page or a stale index from a broken deploy. If you've customized the page title via config.json, use a string from your custom title instead.


Step 2: Monitor the Element Web Configuration Endpoint

Element Web reads its homeserver configuration from /config.json on every load. This file specifies the default homeserver URL, identity server, and feature flags. If /config.json is missing, misconfigured, or returns a non-JSON response, users will see configuration errors and may be unable to log in even though the app itself loads.

Add a dedicated monitor for the config endpoint:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://chat.yourdomain.com/config.json.
  3. Set Expected HTTP status to 200.
  4. Under Keyword check, enter m.homeserver (a required key in the Element Web config JSON).
  5. Set Check interval to 5 minutes.
  6. Click Save.

A minimal config.json that should always be present:

{
  "m.homeserver": {
    "base_url": "https://matrix.yourdomain.com"
  },
  "m.identity_server": {
    "base_url": "https://vector.im"
  }
}

If the keyword check for m.homeserver fails, a recent deploy or nginx configuration change has broken this file — users will see "Homeserver URL does not appear to be a valid Matrix homeserver" errors.


Step 3: Monitor the Matrix Homeserver via Well-Known Delegation

Element Web uses Matrix's Well-Known delegation mechanism to discover the homeserver. The /.well-known/matrix/client endpoint on your domain tells clients which homeserver to connect to. If this endpoint is missing or returns incorrect data, Element Web may be unable to auto-discover the homeserver even with a correct config.json.

Add a monitor for the Well-Known endpoint:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://yourdomain.com/.well-known/matrix/client.
  3. Set Expected HTTP status to 200.
  4. Under Keyword check, enter m.homeserver (the required key in the delegation JSON).
  5. Set Check interval to 5 minutes.
  6. Click Save.

Expected response format:

{
  "m.homeserver": {
    "base_url": "https://matrix.yourdomain.com"
  }
}

Also add a monitor for your Matrix homeserver's own health endpoint:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://matrix.yourdomain.com/_matrix/client/versions.
  3. Set Expected HTTP status to 200.
  4. Under Keyword check, enter versions to confirm the homeserver API is responding.
  5. Set Check interval to 1 minute.
  6. Click Save.

The /_matrix/client/versions endpoint requires no authentication and returns the supported Matrix spec versions — it's the standard homeserver health check used by Matrix clients and federation.


Step 4: SSL Certificate Alerts

Element Web and Matrix require HTTPS everywhere — the Matrix federation protocol mandates TLS, and browsers will refuse to load a secure messaging app over HTTP. An expired certificate on either your Element Web host or your Matrix homeserver will break everything.

Add SSL monitoring to both hosts:

Element Web SSL:

  1. Open the monitor for https://chat.yourdomain.com/.
  2. Enable Monitor SSL certificate under the SSL section.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

Matrix homeserver SSL:

  1. Open the monitor for https://matrix.yourdomain.com/_matrix/client/versions.
  2. Enable Monitor SSL certificate.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

Well-Known delegation SSL: If your Well-Known endpoint is on a different domain or server than your Element Web deployment, add SSL monitoring there too:

  1. Open the monitor for https://yourdomain.com/.well-known/matrix/client.
  2. Enable Monitor SSL certificate.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

Matrix homeserver-to-homeserver federation requires valid certificates from both ends of the connection. An expired certificate doesn't just affect your users — it breaks federation with the broader Matrix network.


Step 5: Heartbeat Monitoring for Element Call Signaling

Element Call is a WebRTC-based group calling feature that can be deployed alongside Element Web. It uses a Matrix-native signaling layer (LiveKit or a Jitsi bridge) to coordinate audio and video calls. If the signaling service goes down, calls fail silently — users see connection errors but the rest of Element Web appears healthy.

Monitor Element Call availability via its health endpoint. If you're running LiveKit as the signaling backend:

GET https://livekit.yourdomain.com/rtc/validate

Add a monitor:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://livekit.yourdomain.com/rtc/validate (or your LiveKit server's health URL).
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

For the LiveKit signaling process, also use a TCP port monitor to confirm the WebRTC signaling port is open:

  1. Click Add MonitorTCP Port.
  2. Enter your LiveKit server hostname and port 7880 (LiveKit's default API port).
  3. Set Check interval to 2 minutes.
  4. Click Save.

If your Element Call deployment uses a cron-managed or systemd-managed process for TURN server refresh or token rotation, add a Vigilmon cron heartbeat:

  1. Click Add MonitorCron Heartbeat.
  2. Set the expected interval to match your refresh job frequency.
  3. Add curl -s https://vigilmon.online/heartbeat/abc123 to the end of the refresh script.

Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a Matrix webhook (via a bot account) for alerts.
  2. For the homeserver monitor, set Consecutive failures before alert to 1 — homeserver downtime means no messages can be sent or received by any user.
  3. For the Element Web static app monitor, set it to 2 — a brief nginx restart may cause a single failed check.
  4. For SSL monitors, the single-alert default is appropriate.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Element Web app | https://chat.yourdomain.com/ | Static app unavailable, web server down | | Config endpoint | /config.json | Configuration missing or broken | | Well-Known delegation | /.well-known/matrix/client | Homeserver discovery broken | | Matrix homeserver | /_matrix/client/versions | Homeserver down, API failure | | SSL certificates | All HTTPS hostnames | Certificate expiry, federation breakage | | Element Call | LiveKit health URL | WebRTC signaling failure |

Element Web and Matrix deliver decentralized, end-to-end encrypted communication — but decentralized doesn't mean self-monitoring. Vigilmon watches every layer of the stack so your team or community knows the moment messaging, calling, or federation is affected.

Monitor your app with Vigilmon

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

Start free →