tutorial

How to Monitor Proto Tool with Vigilmon

Add production-grade uptime and heartbeat monitoring to your Proto Tool-managed dev toolchain — health checks, alert configuration, and status pages.

How to Monitor Proto Tool with Vigilmon

Proto Tool is a multi-language version manager that keeps your development toolchain consistent across machines and teams — managing Node.js, Python, Go, Rust, and more from a single .prototools manifest. When your build pipelines and CI runs depend on Proto installing the right tools at the right versions, you need to know immediately if that infrastructure breaks.

This tutorial covers:

  • A health-check script that validates your Proto-managed tools
  • A Vigilmon heartbeat monitor for CI/CD jobs that use Proto
  • Alerts when a pipeline fails to install or use Proto tools
  • A status page for your build infrastructure

Setup takes about 15 minutes.


Step 1: Validate your Proto Tool environment in CI

Proto doesn't expose an HTTP server — it's a CLI tool. The right monitoring pattern is a heartbeat: your CI job runs Proto, and if it succeeds it pings Vigilmon. If the job fails or never runs, Vigilmon alerts you.

First, add a lightweight validation script to your project:

#!/usr/bin/env bash
# scripts/validate-proto.sh
set -euo pipefail

echo "Validating Proto Tool environment..."

# Confirm proto is on PATH
proto --version

# Verify each tool in .prototools is installed
proto list-remote --installed 2>/dev/null || true

# Run a quick check on each expected tool
TOOLS=("node" "python" "go")
for tool in "${TOOLS[@]}"; do
  if proto run "$tool" -- --version &>/dev/null; then
    echo "✓ $tool OK"
  else
    echo "✗ $tool FAILED" >&2
    exit 1
  fi
done

echo "All Proto-managed tools validated."

Make it executable:

chmod +x scripts/validate-proto.sh

Run it locally after proto install to confirm it works:

proto install
./scripts/validate-proto.sh

Step 2: Create a Vigilmon heartbeat monitor

In Vigilmon:

  1. Sign up at vigilmon.online — free, no card required
  2. Click New Monitor → Heartbeat
  3. Name it something like Proto Tool CI Validation
  4. Set the interval to match how often your pipeline runs (e.g. 1 hour for hourly CI, 1 day for nightly builds)
  5. Copy the heartbeat ping URL
  6. Save

Vigilmon will alert you if the heartbeat is not received within the expected interval.


Step 3: Integrate the heartbeat ping into your CI

Add the ping at the end of your validation script or directly in your CI pipeline config.

Bash script:

#!/usr/bin/env bash
# scripts/validate-proto.sh
set -euo pipefail

echo "Validating Proto Tool environment..."
proto --version

TOOLS=("node" "python" "go")
for tool in "${TOOLS[@]}"; do
  proto run "$tool" -- --version
  echo "✓ $tool OK"
done

# Ping Vigilmon on success
if [ -n "${VIGILMON_PROTO_HEARTBEAT:-}" ]; then
  curl -fsS "$VIGILMON_PROTO_HEARTBEAT" > /dev/null
  echo "Vigilmon heartbeat sent."
fi

GitHub Actions:

# .github/workflows/proto-validate.yml
name: Validate Proto Toolchain

on:
  schedule:
    - cron: '0 * * * *'   # hourly
  push:
    paths:
      - '.prototools'

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

      - name: Install Proto
        run: |
          curl -fsSL https://moonrepo.dev/install/proto.sh | bash
          echo "$HOME/.proto/bin" >> $GITHUB_PATH

      - name: Install tools from .prototools
        run: proto install

      - name: Validate all tools
        run: ./scripts/validate-proto.sh
        env:
          VIGILMON_PROTO_HEARTBEAT: ${{ secrets.VIGILMON_PROTO_HEARTBEAT }}

Set VIGILMON_PROTO_HEARTBEAT as a repository secret (GitHub → Settings → Secrets).


Step 4: Monitor a service that relies on Proto

If your project exposes an HTTP service started via Proto (e.g. proto run node -- server.js), add a health endpoint to that service and monitor it directly:

// server.js (Node.js example)
const http = require('http');

const server = http.createServer((req, res) => {
  if (req.url === '/health') {
    res.writeHead(200, { 'Content-Type': 'application/json' });
    res.end(JSON.stringify({
      status: 'ok',
      runtime: process.version,
      uptime: process.uptime(),
    }));
    return;
  }
  // ... rest of your app
});

server.listen(3000);

Then in Vigilmon:

  1. Click New Monitor → HTTP
  2. URL: https://yourservice.example.com/health
  3. Check interval: 1 minute
  4. Expected status: 200
  5. Save

Step 5: Configure alerts

Go to Notifications → New Channel in Vigilmon:

Slack:

  1. Create an incoming webhook at api.slack.com/apps
  2. Paste the URL into Vigilmon's Slack channel config
  3. Enable it on your monitors

Email:

  1. Add your address under Notifications
  2. Enable for the monitors you care about

Sample alert when the heartbeat is missed:

🔴 MISSED: Proto Tool CI Validation
Expected interval: 1 hour
Last ping: 73 minutes ago

And when it recovers:

✅ RECOVERED: Proto Tool CI Validation
Downtime: 14 minutes

Step 6: Add a status page for your build infrastructure

Go to Status Pages → New Status Page, add your Proto heartbeat monitor (and any HTTP monitors for services it powers), and publish. Share the URL with your team so they can self-check during incidents.

You can also embed a live badge in your repo README:

![Build Infrastructure](https://vigilmon.online/badge/your-monitor-slug)

What you've built

| What | How | |------|-----| | Tool validation | Bash script confirming each Proto-managed binary | | Heartbeat monitor | Vigilmon heartbeat — alerts on missed CI runs | | GitHub Actions integration | Hourly workflow pinging Vigilmon on success | | HTTP monitor | Vigilmon HTTP monitor on services started via Proto | | Slack/email alerts | Vigilmon notification channels | | Status page | Vigilmon public status page for build infra |

Your toolchain is consistent. Now it's also observable.


Next steps

  • Add a separate heartbeat for each environment (dev, staging, production) if they each run Proto-managed pipelines
  • Watch response time trends on any HTTP services powered by Proto
  • Pin your .prototools versions and add a monitor that alerts if the manifest drifts from what's installed

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 →