Skip to content
Worix
BrowsePublish
Log inSign Up

ProcessGuard — Critical Process Monitor

Monitor critical processes and auto-restart on failure. Tracks CPU and memory usage, escalates alerts via webhook, callback, or file, and writes a dead man's...

14 downloads
Free
Reviewed
auto-restart
devops
monitor
process
process-guard
reliability
uptime
watchdog

ProcessGuard — Critical Process Monitor & Auto-Restart

Keep services running without babysitting. Define processes, configure health checks, and let ProcessGuard handle the rest.

What It Does

  • Health checks — HTTP, TCP port, PID file, or shell command
  • Auto-restart — configurable retry limits and cooldown delays
  • CPU & memory monitoring — per-process thresholds with alerts (requires npm install pidusage)
  • Alert escalation — warning → critical, delivered via callback / webhook / JSON file
  • Dead man's switch — heartbeat file updated every 10s so external monitors know if ProcessGuard itself crashes
  • HTTP dashboard — optional /status endpoint for real-time JSON status
  • Command allowlist — optionally restrict which executables restart/check commands may use

Quick Setup

const { ProcessGuard } = require('./src/process-guard');

const guard = new ProcessGuard({
  processes: [
    {
      name: 'ollama',
      check: 'http://localhost:11434/api/tags',
      restart: 'ollama serve',
      maxRestarts: 5,
      cooldown: 5000
    }
  ],
  checkInterval: 30000,
  dashboardPort: 9090,
  alert: {
    onAlert: async (alert) => console.error(`ALERT: ${alert.message}`)
  }
});

guard.start();

See README.md for full documentation, all config options, and advanced examples.

Download

ZIP package — ready to use

Skill Info

Creator
TheShadowRose
Downloads
14
Published
Mar 15, 2026
Updated
Mar 16, 2026