tutorial

Monitoring Gladys Assistant with Vigilmon

Gladys Assistant is a privacy-first smart home hub that keeps all your data local — but if it goes offline, your Zigbee devices and scheduled scenes stop responding. Here's how to monitor Gladys uptime, API health, and scene execution with Vigilmon.

Gladys Assistant is an open-source, privacy-first smart home platform that runs entirely on your own hardware — a Raspberry Pi, a Linux server, or Docker — with no data leaving your home. It integrates with Zigbee devices, MQTT sensors, Philips Hue, TP-Link Kasa, and more through a clean React dashboard and a scene automation engine. Since Gladys runs locally with no cloud fallback, any downtime means your automations stop immediately and your devices become unresponsive. Vigilmon keeps watch over Gladys Assistant's web UI, REST API, scene execution health, and SSL certificates so you catch outages the moment they happen.

What You'll Set Up

  • HTTP uptime monitor for the Gladys Assistant web UI (port 80 or 443)
  • REST API health check via /api/v1/house for core service status
  • TCP port monitor for the Gladys core service
  • SSL certificate alerts for HTTPS-enabled Gladys deployments
  • Heartbeat monitoring for scene and scheduled automation health via /api/v1/scene

Prerequisites

  • Gladys Assistant 4.x running as a Docker container or native Node.js service
  • Web UI accessible on port 80 (HTTP) or 443 (HTTPS)
  • A Gladys API key (generated in the Gladys settings under Integration → HTTP API)
  • A free Vigilmon account

Step 1: Monitor the Gladys Assistant Web UI

The Gladys web UI is your main dashboard for controlling devices and managing automations. Add an HTTP monitor to confirm it's reachable:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter the URL: http://your-gladys-host/ (or https://your-gladys-host/ if HTTPS is enabled)
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

If the web UI is unreachable, the Gladys Node.js process has crashed or the Docker container has exited. This is your primary signal that all local device control has stopped.


Step 2: Monitor the Gladys REST API

Gladys exposes a REST API that allows external integrations and health checks. The /api/v1/house endpoint returns your house structure — rooms and floors — and serves as a reliable indicator that the Gladys core is running and the database is accessible.

The endpoint requires API key authentication:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the URL: http://your-gladys-host/api/v1/house
  3. Set Check interval to 1 minute.
  4. Set Expected HTTP status to 200.
  5. Under Request headers, add:
    Authorization: Bearer YOUR_GLADYS_API_KEY
    
  6. Under Response body check, enter "id" to confirm the JSON house list is populated.
  7. Click Save.

A healthy response looks like:

[
  {
    "id": "a0f5c3e1-...",
    "name": "My Home",
    "latitude": 48.8566,
    "longitude": 2.3522
  }
]

This check validates that the Gladys API, authentication layer, and database connection are all healthy. A failed check while the web UI passes often indicates a database connectivity issue.


Step 3: Add a TCP Port Monitor

A TCP monitor confirms that the Gladys HTTP server is accepting connections at the network layer:

  1. Click Add MonitorTCP Port.
  2. Enter the host: your-gladys-host
  3. Set Port to 80 (or 443 for HTTPS deployments).
  4. Set Check interval to 1 minute.
  5. Click Save.

This catches Docker networking issues — where the container is running but the port mapping has broken — that an HTTP check alone might not surface immediately due to proxy caching.


Step 4: SSL Certificate Alerts for HTTPS Deployments

Gladys Assistant can run directly with HTTPS or behind a reverse proxy. If you're using Let's Encrypt certificates, expiry will cut off access to your smart home hub.

  1. Open the HTTP / HTTPS monitor you created in Step 1.
  2. Ensure the URL uses https://.
  3. Enable Monitor SSL certificate.
  4. Set Alert when certificate expires in less than 21 days.
  5. Click Save.

For Docker deployments with Traefik:

services:
  gladys:
    image: gladysassistant/gladys:latest
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.gladys.rule=Host(`gladys.yourdomain.com`)"
      - "traefik.http.routers.gladys.entrypoints=websecure"
      - "traefik.http.routers.gladys.tls.certresolver=letsencrypt"
      - "traefik.http.services.gladys.loadbalancer.server.port=80"
    volumes:
      - /var/lib/gladysassistant:/var/lib/gladysassistant
      - /run/udev:/run/udev:ro
      - /dev:/dev
    privileged: true
    network_mode: host

A 21-day alert window gives you time to investigate certificate renewal failures before losing HTTPS access to your smart home hub.


Step 5: Heartbeat Monitoring for Scene and Automation Health

Gladys scenes are the core of your home automation — morning routines, motion-triggered lights, presence-based heating schedules. If the scene engine stops executing, automations break silently with no UI indication. Use Vigilmon's cron heartbeat to verify that your scenes are active.

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to 10 minutes.
  3. Copy the heartbeat URL (e.g., https://vigilmon.online/heartbeat/abc123).

Create a heartbeat script that checks scene availability:

#!/bin/bash
# /usr/local/bin/gladys-heartbeat.sh

GLADYS_HOST="http://localhost"
GLADYS_API_KEY="YOUR_GLADYS_API_KEY"
VIGILMON_URL="https://vigilmon.online/heartbeat/abc123"

# Fetch scene list from Gladys API
SCENES=$(curl -sf \
  -H "Authorization: Bearer $GLADYS_API_KEY" \
  "$GLADYS_HOST/api/v1/scene")

if [ $? -ne 0 ]; then
  echo "Failed to reach Gladys scene API — not pinging Vigilmon"
  exit 1
fi

# Verify at least one active scene exists
ACTIVE=$(echo "$SCENES" | grep -o '"active":true' | head -1)

if [ -z "$ACTIVE" ]; then
  echo "No active scenes found in Gladys"
  exit 1
fi

curl -sf "$VIGILMON_URL" > /dev/null
echo "Gladys scene heartbeat OK"

Schedule with cron:

crontab -e
# Add:
*/10 * * * * /usr/local/bin/gladys-heartbeat.sh >> /var/log/gladys-heartbeat.log 2>&1

If Gladys becomes unreachable or no scenes are active, the script withholds the Vigilmon ping and an alert fires after the 10-minute window expires. Adjust the interval to match how often you need to verify scene health.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add email, Slack, or a webhook.
  2. On the web UI and API monitors, set Consecutive failures before alert to 2 — Gladys can take a few seconds to respond during Zigbee device scanning operations.
  3. On the heartbeat monitor, leave the threshold at 1 missed ping — a missed heartbeat confirms the automation engine or API is down.

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP — Web UI | http://host/ | Gladys process crash, container exit | | HTTP — House API | http://host/api/v1/house | API failure, database connectivity loss | | TCP Port | host:80 | HTTP server not accepting connections | | SSL Certificate | https://gladys.yourdomain.com | Let's Encrypt renewal failure | | Cron Heartbeat | Heartbeat URL | Scene engine failure, no active automations |

Gladys Assistant's privacy-first design means there's no cloud fallback — when it goes down, your smart home goes silent. With Vigilmon watching the web UI, REST API, TCP port, and scene execution health, you'll catch failures before your morning routines and motion automations stop firing.

Monitor your app with Vigilmon

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

Start free →