tutorial

How to Monitor Volta Managed Services with Vigilmon

Volta is a JavaScript tool manager that pins Node.js, npm, and Yarn versions per project via `package.json`. It ships as a single binary, works without shell...

Volta is a JavaScript tool manager that pins Node.js, npm, and Yarn versions per project via package.json. It ships as a single binary, works without shell configuration hacks, and guarantees every contributor runs the exact same toolchain. But when the services Volta-managed runtimes power go down, Volta itself won't tell you.

In this tutorial you'll add external uptime monitoring to services built and run with Volta-managed JavaScript toolchains using Vigilmon — free tier, no credit card required.


Why monitor Volta managed services?

Volta is used in teams that need zero-friction toolchain pinning across local development, CI, and production containers. Once those services are running, the standard failure modes apply:

  • Silent toolchain version mismatch — a deployment container missing Volta falls back to a system Node.js version that differs from the pinned project version
  • Package manager incompatibilities — pinning npm to an older version causes npm install to behave differently between environments, resulting in a broken production build
  • Process crashes without notification — the Node.js process exits and the port goes dark with no alert sent
  • Shim resolution failures — Volta shims fail to resolve in restricted environments (read-only filesystems, minimal containers) causing the service to not start at all

Vigilmon monitors from outside your infrastructure, giving you an objective signal that is independent of what Volta's shim layer or the host process reports.


What you'll need

  • A Node.js service started under a Volta-pinned toolchain that exposes an HTTP or TCP endpoint
  • A free Vigilmon account

Step 1: Add a health endpoint to your service

Give Vigilmon something reliable to check. Add a /health route that exposes toolchain version information:

// Express
app.get('/health', (req, res) => {
  res.json({
    status: 'ok',
    node: process.version,
    npm: process.env.npm_config_user_agent || 'unknown',
    uptime: process.uptime()
  });
});
// NestJS
@Get('health')
health() {
  return {
    status: 'ok',
    node: process.version,
    uptime: process.uptime(),
  };
}

Including process.version makes it easy to confirm which Node.js version Volta resolved — useful when debugging toolchain drift between local and production containers.


Step 2: Confirm Volta pins in package.json

Ensure your package.json includes Volta engine pins so every environment uses the same toolchain:

{
  "name": "my-api",
  "volta": {
    "node": "20.12.0",
    "npm": "10.5.0"
  }
}

Add a startup assertion to enforce this at runtime:

// check-volta.js
const expected = '20.12.0';
const actual = process.version.replace('v', '');

if (actual !== expected) {
  console.error(`Node version mismatch: expected ${expected}, got ${actual}`);
  console.error('Ensure Volta is installed and run: volta install node@' + expected);
  process.exit(1);
}
{
  "scripts": {
    "prestart": "node check-volta.js",
    "start": "node dist/server.js"
  }
}

Step 3: Set up HTTP monitoring in Vigilmon

Once your service is running at a publicly reachable URL, point Vigilmon at the health endpoint:

  1. Log in to vigilmon.online and go to Monitors → New Monitor
  2. Choose HTTP / HTTPS
  3. Set the URL to your health endpoint, e.g. https://api.example.com/health
  4. Set the check interval to 1 minute
  5. Under Expected response, set:
    • Status code: 200
    • (Optional) Response body contains: "status":"ok"
  6. Save the monitor

Vigilmon checks from multiple regions every minute. A timeout or non-200 response opens an incident immediately.


Step 4: Add TCP port monitoring for background workers

Volta-managed projects often include background workers or microservices running on non-HTTP ports. Add a TCP monitor for each:

  1. Go to Monitors → New Monitor
  2. Choose TCP Port
  3. Enter your server hostname and port, e.g. worker.example.com / 4000
  4. Save

If the Node.js process crashes or the port binding drops, Vigilmon fires an alert within a minute — regardless of what PM2 or the container orchestrator reports.


Step 5: Track key metrics

| Metric | What it catches | |---|---| | HTTP response code | Application crash, bad deploy, shim resolution failure | | HTTP response time | Performance regression from Node.js version change | | TCP port reachability | Process exit, failed service start in container | | Response body node field | Toolchain version mismatch in production |

Vigilmon stores response time history automatically. Set a threshold alert (e.g. alert if response time > 1.5 s) to catch performance regressions after a Node.js or npm upgrade.


Step 6: Add a heartbeat monitor to your CI pipeline

Volta is used in CI to ensure every runner uses the project's pinned toolchain. When Volta's download server is unavailable or a container's PATH is misconfigured, the build fails silently and deployments never happen. Add a Vigilmon heartbeat:

  1. In Vigilmon, go to New Monitor → Heartbeat
  2. Name it CI Build — main
  3. Set the expected interval to your CI frequency (e.g. 1 hour)
  4. Copy the ping URL

In your GitHub Actions workflow:

- name: Install Volta
  run: curl https://get.volta.sh | bash

- name: Set up Node.js with Volta pinned version
  run: |
    export VOLTA_HOME="$HOME/.volta"
    export PATH="$VOLTA_HOME/bin:$PATH"
    volta install node
    node --version

- name: Build and deploy
  run: npm run build && npm run deploy

- name: Ping Vigilmon — CI run succeeded
  if: success()
  run: |
    curl -fsS -X POST "${{ secrets.VIGILMON_VOLTA_HEARTBEAT_URL }}" \
      --max-time 10 --retry 3

If Volta fails to resolve the toolchain or the build breaks, no ping is sent and Vigilmon alerts after the grace period.


Step 7: Configure alert channels

  1. Go to Alert Channels → Add Channel
  2. Choose Email or Webhook (Slack, Discord, PagerDuty)
  3. Assign the channel to your HTTP and TCP monitors
  4. Set the alert trigger to 1 failed check for immediate notification

When a service goes down:

🔴 DOWN: api.example.com/health
Duration: 5 minutes
Last response: connection refused

When it recovers:

✅ RECOVERED: api.example.com/health
Downtime: 5 minutes

Step 8: Create a status page for your JavaScript services

If your team runs multiple services with Volta-pinned toolchains, a status page surfaces all of them in one view:

  1. Go to Status Pages → New Status Page
  2. Name it (e.g. "JavaScript Services Status")
  3. Add all HTTP and TCP monitors
  4. Publish and share the URL with your team

Team members can check which service is down before filing a bug, and on-call engineers get a single dashboard view across all Volta-managed projects.


Conclusion

Volta ensures every contributor and CI runner uses exactly the same JavaScript toolchain. Vigilmon ensures those services are actually serving healthy traffic. Together they close both the "wrong toolchain" and the "service is down" gaps. Set up a /health endpoint, create a one-minute Vigilmon HTTP monitor, and add heartbeat monitoring to your CI pipeline — you'll have full coverage in under ten minutes.

Get started 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 →