tutorial

Monitoring Storybook with Vigilmon: Detect Silent Build and Story Test Failures

Use Vigilmon to monitor your Storybook build pipeline and interaction tests so broken component development environments never reach your team undetected.

Your Storybook build had been deploying successfully to your internal component library URL for months. Then a peer dependency conflict between a new design-system package and Storybook's webpack config caused the build to silently produce a blank page. The HTML was served, the URL returned 200, and your standard uptime monitor reported all-clear — while every developer who opened the component library saw nothing but a white screen.

Storybook-specific failures require Storybook-specific monitoring. This tutorial shows you how to use Vigilmon to catch broken Storybook builds, failed story interaction tests, and stalled nightly publish jobs before your component library becomes a liability.

What You'll Cover

  • Uptime monitoring for deployed Storybook instances
  • Heartbeat monitoring for Storybook build and publish pipelines
  • Detecting blank-page Storybook deployments that pass HTTP checks
  • Monitoring Storybook interaction tests (@storybook/test) in CI
  • Alerting on stalled nightly component library publishes
  • CI integration for GitHub Actions

Prerequisites

  • Storybook 7.x or 8.x
  • A Storybook instance deployed to a stable URL (GitHub Pages, Chromatic, S3, Netlify, etc.)
  • A free account at vigilmon.online

The Problem: Why HTTP Uptime Alone Isn't Enough for Storybook

Standard uptime monitoring checks whether a URL returns HTTP 200. For Storybook that's necessary but not sufficient:

  • A misconfigured webpack or Vite build produces a blank index.html (HTTP 200, no stories)
  • A broken storybook.config.js import causes the app to mount but render nothing
  • Stale cached builds serve an old component library that doesn't match the current codebase
  • Nightly publish jobs fail silently, leaving developers reading week-old documentation
  • Interaction tests (play functions) fail in CI without alerting outside the CI system

Vigilmon's two monitoring modes — uptime and heartbeat — together cover all of these cases.


Step 1: Uptime Monitor for Your Deployed Storybook

1.1 Create an HTTP monitor

  1. Log in to Vigilmon and click New Monitor → HTTP.
  2. Set the URL to your Storybook deployment (e.g., https://components.example.com).
  3. Set Check interval to 5 minutes.
  4. Enable Keyword check and enter a string that only appears in a working Storybook: storybook-root or Storybook.

The keyword check is the critical difference. A blank-page build returns HTTP 200 but won't contain storybook-root — Vigilmon catches what a plain HTTP check misses.

1.2 Configure the keyword check

When Storybook builds correctly, the served index.html contains:

<div id="storybook-root"></div>

Set the keyword to storybook-root. If this string is absent, Vigilmon marks the monitor as down even though HTTP 200 was returned.


Step 2: Heartbeat Monitor for Your Storybook Build Pipeline

For teams that rebuild and redeploy Storybook on a schedule (nightly, after each merge to main), add a heartbeat monitor so missed builds don't go undetected.

  1. Click New Monitor → Heartbeat.
  2. Name it Storybook Build — Component Library.
  3. Set Expected interval to 24 hours for nightly builds, or 1 hour if you build on every main-branch merge.
  4. Set Grace period to 20 minutes to absorb webpack/Vite cold-start times.
  5. Save and copy the Ping URLhttps://vigilmon.online/api/heartbeat/<unique-id>.

Step 3: Ping Vigilmon from Your Storybook Build Script

Add the heartbeat ping to the build-and-deploy step in your CI pipeline. The ping fires only after a successful build and deploy — a build failure suppresses it.

GitHub Actions — nightly Storybook build

# .github/workflows/storybook.yml
name: Build and Deploy Storybook

on:
  schedule:
    - cron: "0 3 * * *"   # 03:00 UTC nightly
  push:
    branches: [main]

jobs:
  storybook:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "20"
          cache: "npm"

      - name: Install dependencies
        run: npm ci

      - name: Build Storybook
        run: npm run build-storybook -- --output-dir storybook-static

      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./storybook-static

      - name: Ping Vigilmon heartbeat
        if: success()
        run: |
          curl -fsS -X POST "${{ secrets.VIGILMON_STORYBOOK_HEARTBEAT_URL }}" \
            --max-time 10 --retry 3 --retry-delay 5

The if: success() condition ensures the ping is skipped if any previous step fails.


Step 4: Monitor Storybook Interaction Tests

Storybook 7+ supports interaction tests via play functions and the @storybook/test-runner package. Add a dedicated heartbeat for these so test regressions surface outside of CI:

# .github/workflows/storybook-tests.yml
name: Storybook Interaction Tests

on:
  schedule:
    - cron: "0 2 * * *"   # Nightly
  push:
    branches: [main]

jobs:
  test-storybook:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: "20"
          cache: "npm"

      - name: Install dependencies
        run: npm ci

      - name: Install Playwright browsers
        run: npx playwright install --with-deps chromium

      - name: Build Storybook
        run: npm run build-storybook -- --quiet

      - name: Run Storybook tests
        run: |
          npx concurrently -k -s first -n "SB,TEST" \
            "npx http-server storybook-static --port 6006 --silent" \
            "npx wait-on tcp:6006 && npx test-storybook --url http://localhost:6006"

      - name: Ping Vigilmon heartbeat
        if: success()
        run: |
          curl -fsS -X POST "${{ secrets.VIGILMON_STORYBOOK_TESTS_HEARTBEAT_URL }}" \
            --max-time 10 --retry 3 --retry-delay 5

Create a separate Vigilmon heartbeat monitor (Storybook Interaction Tests — Nightly) with a 25-hour interval and 30-minute grace period.


Step 5: Multi-Monitor Setup

| Monitor type | Name | Interval | What it catches | |---|---|---|---| | HTTP + keyword | Storybook — Production | 5 min | Blank page, 404, deployment failure | | Heartbeat | Storybook Build — Nightly | 25 h | Missed build, webpack error, deploy failure | | Heartbeat | Storybook Interaction Tests | 25 h | Broken play functions, test runner failure | | Heartbeat | Storybook Chromatic Publish | 25 h | Chromatic CI step silently skipped |


Step 6: Configure Alert Channels

In Vigilmon, go to Notifications → New Channel and configure:

  • Email — immediate alert to your frontend or design systems team
  • Slack webhook — ping your #design-system or #frontend-alerts channel

Sample missed-heartbeat notification:

🔴 MISSED HEARTBEAT: Storybook Build — Nightly
Last ping: 25 hours ago
Expected interval: 24 hours

Blank-page uptime alert:

🔴 DOWN: Storybook — Production
Keyword "storybook-root" not found
URL: https://components.example.com

Recovery notification:

✅ UP: Storybook — Production
Downtime: 47 minutes

What You're Now Catching

| Silent failure mode | How Vigilmon detects it | |---|---| | Blank-page build (webpack/Vite misconfiguration) | HTTP 200 but keyword missing → alert | | Nightly build job disabled | No heartbeat ping → alert after grace period | | build-storybook exits with error | CI fails, heartbeat suppressed → alert | | Interaction test regression | Test runner fails, heartbeat suppressed → alert | | Stale component library (old cached build served) | Keyword check fails if version string changes → alert | | Deploy step fails silently | No heartbeat on deploy failure → alert |


Storybook keeps your component library alive and documented — but only if it actually builds and deploys successfully. Vigilmon's combination of keyword-checked uptime monitoring and build-pipeline heartbeats gives you confident coverage of the full Storybook lifecycle.

Add Vigilmon to your Storybook workflow today — 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 →