Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

vps-guardianvps 守护者

Agent Skill

vps-guardian 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,882

周安装

80

GitHub Stars

公开资料未说明

下载量

659
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:vps-guardian(vps 守护者)
来源仓库:https://github.com/strouddustinn-bot/vps-guardian
安装命令:
openclaw skills install vps-guardian
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install vps-guardian

简介

自主 VPS 监控和自动修复 — 杀死失控的进程、释放磁盘、重新启动死服务、强化安全性。不是警报。行动。

SKILL.md

name
vps-guardian
description
Autonomous VPS monitoring and auto-remediation — kills runaway procs, frees disk, restarts dead services, hardens security. Not alerts. Action.
tags
category
devops

VPS Guardian — Self-Healing Server Agent

What It Does

VPS Guardian doesn't just alert you when something's wrong — it fixes it. An autonomous agent that monitors your VPS and takes action: killing runaway processes, freeing disk space, restarting dead services, and hardening security.

Philosophy: Alerts are for humans. Guardians act.

Quick Start

Install

# Download
sudo curl -o /usr/local/bin/vps-guardian https://raw.githubusercontent.com/vps-guardian/guardian/main/src/guardian.py
sudo chmod +x /usr/local/bin/vps-guardian

# Configure (optional — defaults are sensible)
sudo cp /usr/local/bin/vps-guardian.conf.example /etc/vps-guardian.conf

Run

# One-shot scan + remediate
vps-guardian --scan

# Daemon mode (continuous monitoring)
vps-guardian --daemon

# Dry run (report only, no action)
vps-guardian --dry-run

Schedule with Cron

# Every 5 minutes
*/5 * * * * /usr/local/bin/vps-guardian --scan >> /var/log/vps-guardian.log 2>&1

What It Fixes

1. Runaway Processes

  • Detects processes consuming >90% CPU for 5+ minutes
  • Identifies zombie processes (state Z)
  • Finds OOM candidates (highest RSS on low memory)
  • Action: SIGTERM, then SIGKILL after 10s if unresponsive
  • Logs PID, command, CPU%, memory%, and duration before killing

2. Disk Space Recovery

  • Warns at 80% usage, acts at 90%
  • Rotates logs older than 7 days (gzip)
  • Clears /tmp files older than 3 days
  • Removes orphaned apt caches
  • Truncates journal logs >500MB
  • Action: Sequential cleanup until below threshold
  • Logs bytes freed and what was cleaned

3. Dead Service Restart

  • Monitors critical systemd services
  • Detects failed/inactive states
  • Attempts systemctl restart up to 3 times
  • Escalates to alert after 3 failures
  • Action: Auto-restart with exponential backoff (5s, 30s, 120s)

4. Security Hardening

  • Detects unexpected listening ports (diffs against baseline)
  • Identifies brute-force SSH attempts (fail2ban integration)
  • Flags world-writable files in /etc, /root
  • Checks for suspicious processes (crypto miners, reverse shells)
  • Action: Blocks IPs via iptables, chmods files, kills suspicious processes
  • Never auto-blocks — always requires approval (prevents lockout)

5. Memory Recovery

  • Detects memory pressure (available <10%)
  • Identifies top memory consumers
  • Clears page cache, dentries, inodes
  • Action: Cache drop first, process kill as last resort

Configuration

# /etc/vps-guardian.conf

[thresholds]
cpu_kill_percent = 90
cpu_kill_duration = 300
disk_warn_percent = 80
disk_act_percent = 90
memory_act_percent = 90
zombie_kill = true

[services]
# Services to auto-restart when down
critical = ssh, cron, systemd-resolved, rsyslog
# Services to monitor but NOT auto-restart
watched = nginx, docker, fail2ban

[security]
block_bruteforce = true
max_ssh_failures = 10
scan_suspicious_procs = true
auto_block = false    # Always requires approval

[cleanup]
rotate_logs_days = 7
tmp_max_age_days = 3
journal_max_size_mb = 500
apt_cache_clean = true

[alerts]
telegram_bot_token =
telegram_chat_id =
webhook_url =

Exit Codes

CodeMeaning
0Healthy — no issues found
1Remediated — fixed issues, all clear now
2Critical — unrecoverable issues remain
3Error — guardian itself failed

Logging

All actions are logged with before/after state:

[2026-04-17T06:30:00Z] RUNAWAY pid=4523 cmd="node server.js" cpu=94.2% mem=1.2G duration=420s → SIGTERM → exited
[2026-04-17T06:30:05Z] DISK / 92% → rotated /var/log/syslog.1 (freed 340MB) → 87%
[2026-04-17T06:30:10Z] SERVICE ssh: inactive → restarted → active
[2026-04-17T06:30:15Z] SECURITY 5 SSH failures from 45.33.xx.xx → blocked via iptables

Safety Mechanisms

  • Protected processes: Never kills pid 1, kernel threads, or self
  • Protected services: Never restarts systemd itself
  • Rate limiting: Max 5 process kills per scan cycle
  • Dry run mode: --dry-run shows what would happen without acting
  • Whitelist: Exclude processes/services from remediation
  • Approval gate: Security actions always require confirmation

Requirements

  • Linux (systemd-based)
  • Python 3.8+
  • Root or sudo access
  • No external dependencies (stdlib only)

Differences from Monitoring Tools

FeatureTraditional MonitoringVPS Guardian
Detects issuesYesYes
Sends alertsYesYes
Fixes issuesNoYes
Requires humanYesNo (configurable)
Runs autonomouslyNoYes
Learns baselinesSometimesYes (over time)

Support

  • Issues: https://github.com/vps-guardian/guardian/issues
  • Docs: https://vps-guardian.io/docs

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

94.98%
按下载量换算626

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills