← 返回
数据分析

ProcessGuard — Critical Process Monitor & Auto-Restart

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...
监控关键进程并自动重启,追踪CPU与内存使用,通过webhook、回调或文件发送告警,支持看门狗机制。
theshadowrose
数据分析 clawhub v2.1.4 1 版本 100000 Key: 无需
★ 0
Stars
📥 918
下载
💾 13
安装
1
版本
#auto-restart#devops#latest#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.

版本历史

共 1 个版本

  • v2.1.4 当前
    2026-03-18 20:44 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 366 📥 139,963
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 162 📥 59,675
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 64,859