← 返回 Skills 市场
shirley6692026

Gateway Monitor Auto Restart

作者 shirley6692026 · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
1798
总下载
1
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install gateway-monitor-auto-restart
功能描述
Monitors OpenClaw gateway every 3 hours, auto-restarts if unresponsive, diagnoses startup issues, and rotates logs with 7-day retention.
使用说明 (SKILL.md)

Gateway Monitor Auto-Restart Skill

Automatically monitors the OpenClaw gateway status and restarts it if it becomes unresponsive. Features 3-hour checks, smart restart logic, issue diagnosis, and 7-day log rotation.

Description

This skill provides comprehensive monitoring for the OpenClaw gateway with automatic restart capabilities. It includes:

  • Health checks every 3 hours
  • Smart restart mechanism when gateway is down
  • Issue diagnosis when startup fails
  • 7-day log rotation system
  • Fast recovery system that prioritizes quick gateway restart

Features

  • Automatic Monitoring: Checks gateway status every 3 hours
  • Smart Restart: Restarts gateway when it becomes unresponsive
  • Issue Diagnosis: Identifies and reports startup issues
  • Fast Recovery: Prioritizes quick gateway restart
  • Log Management: Maintains logs with 7-day rotation
  • Error Handling: Gracefully handles "already running" errors

Usage

The skill automatically sets up a cron job that runs the monitoring script every 3 hours. The monitoring system will:

  1. Check if the gateway is responsive
  2. If unresponsive, attempt to restart it
  3. If restart fails, diagnose the issue
  4. Log all activities with timestamp
  5. Rotate logs older than 7 days

Requirements

  • OpenClaw gateway installed and configured
  • Proper permissions to manage gateway service
  • Cron access for scheduling checks

Configuration

No additional configuration required. The skill automatically installs the monitoring system with optimal settings.

安全使用建议
This skill appears to do what it claims, but it makes persistent, local changes and performs intrusive actions on local processes. Before installing: 1) Inspect the scripts (gateway_monitor.sh and setup.sh) yourself; 2) Run setup.sh from the directory where the scripts will remain (setup embeds the current working directory into the cron job); 3) Backup your current crontab (crontab -l > crontab.bak) so you can revert; 4) Ensure you have the OpenClaw CLI available and understand the permissions required — the script uses pkill, launchctl and other commands that will affect local processes and ports; 5) If you later uninstall, remove the cron entry and the created log files. If you are uncomfortable granting those local privileges or want more control, consider running the monitor manually or converting it to a systemd/managed service with explicit paths and privileges.
功能分析
Type: OpenClaw Skill Name: Developer: Version: Description: OpenClaw Agent Skill Suspicious High-Entropy/Eval files: 2 The skill is classified as suspicious due to its use of high-privilege system commands, even though they are ostensibly for the stated purpose of monitoring and restarting the OpenClaw gateway. Specifically, `setup.sh` modifies the user's crontab for persistence, and `gateway_monitor.sh` uses `launchctl` for service management and `pkill` to terminate processes. While these actions are described as necessary for 'smart restart' and 'issue diagnosis,' they represent significant system access and control, elevating the risk beyond a benign classification, despite lacking clear evidence of intentional malicious behavior like data exfiltration.
能力评估
Purpose & Capability
Name/description (monitor + auto-restart gateway) matches the included scripts: gateway_monitor.sh performs health checks, restart attempts, diagnosis, and log rotation; setup.sh installs a cron job. The requested capabilities (managing gateway service, cron access) are proportionate to the purpose.
Instruction Scope
SKILL.md and setup.sh instruct the agent/user to create a cron job and run gateway_monitor.sh which runs openclaw CLI commands, pgrep/pkill, lsof, and launchctl. These operations are appropriate for restarting/diagnosing a local gateway, but they do require permission to manage services and will inspect/kill local processes and ports — this is scope-appropriate but intrusive for a monitoring script.
Install Mechanism
There is no remote install/download; the package is instruction- and script-based. setup.sh makes the monitor executable, creates a log directory, and writes a cron entry. No external URLs or extracted archives are used.
Credentials
The skill requests no environment variables or external credentials (good). However it does require system permissions to manage the gateway service and install cron jobs. Those privileges are necessary for its function but worth noting because the scripts run commands that affect local services and processes.
Persistence & Privilege
The skill persists by adding a cron job (runs every 3 hours) and writes logs under $HOME/.openclaw/logs. It does not set always: true. The cron entry is persistent across reboots and will continue to run until removed; that persistent presence is expected for a monitor but is a notable permission/persistence action.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gateway-monitor-auto-restart
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gateway-monitor-auto-restart 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Adds automatic monitoring and smart restart for the OpenClaw gateway. - Checks gateway health every 3 hours and restarts if unresponsive. - Diagnoses issues if the gateway fails to start. - Implements 7-day log rotation and detailed logging. - Handles "already running" errors gracefully. - No manual configuration needed; setup is automatic.
元数据
Slug gateway-monitor-auto-restart
版本 1.0.1
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Gateway Monitor Auto Restart 是什么?

Monitors OpenClaw gateway every 3 hours, auto-restarts if unresponsive, diagnoses startup issues, and rotates logs with 7-day retention. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1798 次。

如何安装 Gateway Monitor Auto Restart?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gateway-monitor-auto-restart」即可一键安装,无需额外配置。

Gateway Monitor Auto Restart 是免费的吗?

是的,Gateway Monitor Auto Restart 完全免费(开源免费),可自由下载、安装和使用。

Gateway Monitor Auto Restart 支持哪些平台?

Gateway Monitor Auto Restart 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Gateway Monitor Auto Restart?

由 shirley6692026(@shirley6692026)开发并维护,当前版本 v1.0.1。

💬 留言讨论