← Back to Skills Marketplace
shirley6692026

Gateway Monitor Auto Restart

by shirley6692026 · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
1798
Downloads
1
Stars
3
Active Installs
1
Versions
Install in OpenClaw
/install gateway-monitor-auto-restart
Description
Monitors OpenClaw gateway every 3 hours, auto-restarts if unresponsive, diagnoses startup issues, and rotates logs with 7-day retention.
README (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.

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gateway-monitor-auto-restart
  3. After installation, invoke the skill by name or use /gateway-monitor-auto-restart
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug gateway-monitor-auto-restart
Version 1.0.1
License
All-time Installs 3
Active Installs 3
Total Versions 1
Frequently Asked Questions

What is Gateway Monitor Auto Restart?

Monitors OpenClaw gateway every 3 hours, auto-restarts if unresponsive, diagnoses startup issues, and rotates logs with 7-day retention. It is an AI Agent Skill for Claude Code / OpenClaw, with 1798 downloads so far.

How do I install Gateway Monitor Auto Restart?

Run "/install gateway-monitor-auto-restart" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Gateway Monitor Auto Restart free?

Yes, Gateway Monitor Auto Restart is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Gateway Monitor Auto Restart support?

Gateway Monitor Auto Restart is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Gateway Monitor Auto Restart?

It is built and maintained by shirley6692026 (@shirley6692026); the current version is v1.0.1.

💬 Comments