tutorial

Monitoring Your Glimmer.js App with Vigilmon: Health Checks, Heartbeats & Uptime Alerts

Add production-grade monitoring to a Glimmer.js application — a health API, background job heartbeats, and instant alerts when your component-based frontend or backend goes down.

Glimmer.js is a lightweight, blazing-fast UI component library extracted from Ember.js and powered by the Glimmer VM rendering engine. Its fine-grained reactivity and minimal footprint make it ideal for high-performance web UIs. But performance gains disappear entirely when your app is down, your API is unreachable, or a background sync has been silently failing for hours. Vigilmon gives you the visibility layer you need: continuous HTTP monitoring, heartbeat checks, and instant alerts routed to email or Slack.

What You'll Build

  • A health API endpoint for your Glimmer.js backend
  • Vigilmon HTTP monitors for your Glimmer component app and backend
  • A heartbeat for scheduled background tasks
  • Alert channels (email and Slack)
  • An uptime badge embedded in your app UI

Prerequisites

  • A Glimmer.js project (e.g. via Ember CLI or a custom Vite/Rollup setup)
  • Node.js backend (Express or similar) for the health endpoint
  • A free Vigilmon account

Step 1: Add a Health Endpoint

Glimmer.js is a pure frontend library, so health checks live in your backend server. Here's a minimal Express health route:

// server.js
import express from "express";

const app = express();

app.get("/health", async (req, res) => {
  const checks = {};
  let degraded = false;

  // Database check
  try {
    // await db.query("SELECT 1");
    checks.database = "ok";
  } catch (err) {
    checks.database = `error: ${err.message}`;
    degraded = true;
  }

  // External service check
  try {
    const resp = await fetch("https://api.yourservice.com/ping", {
      signal: AbortSignal.timeout(3000),
    });
    checks.externalApi = resp.ok ? "ok" : `http_${resp.status}`;
  } catch {
    checks.externalApi = "unreachable";
    degraded = true;
  }

  res.status(degraded ? 503 : 200).json({
    status: degraded ? "degraded" : "ok",
    timestamp: new Date().toISOString(),
    checks,
  });
});

app.listen(process.env.PORT ?? 3000, () => {
  console.log("Server running on port", process.env.PORT ?? 3000);
});

Test it:

curl http://localhost:3000/health | jq .
# {"status":"ok","timestamp":"2026-06-29T...","checks":{"database":"ok","externalApi":"ok"}}

Step 2: Configure Vigilmon HTTP Monitors

Log in to VigilmonMonitors → New Monitor:

Monitor 1: Glimmer.js App

| Field | Value | |---|---| | URL | https://yourapp.com/ | | Method | GET | | Expected status | 200 | | Expected body | Any stable string from your HTML (e.g. app title) | | Check interval | 1 minute |

Monitor 2: Health API

| Field | Value | |---|---| | URL | https://yourapp.com/health | | Method | GET | | Expected status | 200 | | Check interval | 1 minute |

With both monitors active, you cover two independent failure domains: the static serving/CDN layer and the backend/data layer.


Step 3: Heartbeat for Background Tasks

Long-running or scheduled jobs (data sync, email digests, webhook ingestion) fail silently without heartbeat monitoring. A Vigilmon heartbeat alerts you when the expected ping doesn't arrive.

npm install node-cron
// scheduler.js
import cron from "node-cron";

const VIGILMON_HEARTBEAT_URL = process.env.VIGILMON_HEARTBEAT_URL ?? "";

async function pingHeartbeat() {
  if (!VIGILMON_HEARTBEAT_URL) return;
  try {
    await fetch(VIGILMON_HEARTBEAT_URL, { signal: AbortSignal.timeout(5000) });
  } catch {
    // Monitoring must never crash the job
  }
}

cron.schedule("*/10 * * * *", async () => {
  try {
    await runDataSync();
    await pingHeartbeat();
  } catch (err) {
    console.error("[scheduler] Data sync failed:", err);
    // Vigilmon alerts after the heartbeat window expires with no ping
  }
});

async function runDataSync() {
  // Your actual data synchronization logic
}

Set up the heartbeat in Vigilmon:

  1. Monitors → New Heartbeat Monitor
  2. Set Expected interval to 20 minutes (2× the cron interval)
  3. Copy the ping URL to your .env:
VIGILMON_HEARTBEAT_URL=https://vigilmon.online/api/heartbeat/xxxxxxxx

Step 4: Display Uptime Status in Your Glimmer.js UI

Glimmer.js components use tracked properties for reactive state. Here's a simple status badge component:

// src/ui/components/status-badge/component.js
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";

const BADGE_URL = "https://vigilmon.online/api/badge/your-monitor-id.svg";
const STATUS_URL = "https://vigilmon.online/status/your-monitor-slug";

export default class StatusBadgeComponent extends Component {
  @tracked badgeLoaded = false;
  badgeUrl = BADGE_URL;
  statusUrl = STATUS_URL;

  handleLoad = () => {
    this.badgeLoaded = true;
  };
}
{{! src/ui/components/status-badge/template.hbs }}
<a
  href={{this.statusUrl}}
  target="_blank"
  rel="noopener noreferrer"
  aria-label="Service uptime status"
>
  <img
    src={{this.badgeUrl}}
    alt="Uptime"
    width="120"
    height="20"
    {{on "load" this.handleLoad}}
    style={{if this.badgeLoaded "opacity: 1" "opacity: 0"}}
  />
</a>

Add it to your app template:

{{! src/ui/app.hbs }}
<main>
  {{outlet}}
</main>
<footer>
  <StatusBadge />
</footer>

Step 5: Set Up Alert Channels

In Vigilmon's Alert Channels settings:

Email

  1. Alert Channels → Email → add your on-call email
  2. Attach to both HTTP monitors and the heartbeat

Slack

  1. Create a Slack Incoming Webhook for #alerts
  2. Alert Channels → Webhook → paste the URL
  3. Payload template:
{
  "text": "🚨 *{{ monitor.name }}* is DOWN\n{{ monitor.url }}\nStatus: {{ event.status }}\n<https://vigilmon.online|Open Vigilmon>"
}

Step 6: Verify Everything Works

# 1. Health endpoint
curl -s https://yourapp.com/health | jq .

# 2. Break the DB connection → confirm health returns 503
# Expected: Vigilmon alerts within 2 minutes

# 3. Stop the scheduler → let heartbeat window expire
# Expected: heartbeat alert fires after the grace window

# 4. Vigilmon → "Test Alert" → confirm delivery to Slack/email

Summary

| Monitor | What It Catches | |---|---| | HTTP app check | CDN failures, broken static deploys | | HTTP health API | Database, cache, and third-party API failures | | Heartbeat | Scheduler crashes, silent sync failures |


Next Steps

  • Create separate monitors for staging vs. production
  • Use Vigilmon's response time graphs to spot latency regressions in your Glimmer component rendering pipeline
  • Configure multi-channel alerting: email for low-severity, Slack for critical

Ready to get started? Sign up for Vigilmon free — have your first monitor running in under 5 minutes.

Monitor your app with Vigilmon

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

Start free →