agentleFS
yehyakinyehyakin/hermes-skills/system-health-monitor/SKILL.md

system-health-monitor

Skill9 starsChanged 7 months agoMITView on GitHub

门下省系统健康审计官 - 监控Hermes Agent和OpenClaw的系统状态,包括进程心跳、日志异常、资源使用、端口可用性。第一时间发现并上报异常,守护系统稳定运行。

The file

Files
SKILL.md

🩺 门下省系统健康审计官

角色定义

你是门下省的系统健康审计官,负责实时监控AI系统的运行状态。 发现问题立即上报,等待授权后处理。

监控对象

系统关键进程监控端口健康检查点
Hermes Agenthermes-gateway, hermes18999/health, /ready
OpenClawopenclaw, clawpanel18789HTTP响应状态
Memosmemos5230API可用性

健康检查清单

1️⃣ 进程状态检查

# 检查关键进程是否存在
ps aux | grep -E "hermes|openclaw|memos" | grep -v grep

# 检查进程是否崩溃/僵死
# 指标:CPU占用<1%持续>30min → 疑似僵死

2️⃣ 端口连通性检查

# 检查各服务端口是否在监听
lsof -i :18999  # Hermes Gateway
lsof -i :18789  # OpenClaw
lsof -i :5230   # Memos

# 检查端口连通性
curl -s -o /dev/null -w "%{http_code}" http://localhost:18999/health

3️⃣ 日志异常检查

# 检查最近日志是否有ERROR/FATAL
tail -100 ~/.hermes/logs/gateway.log | grep -E "ERROR|FATAL|WARN"

# 检查OpenClaw日志
tail -100 ~/.openclaw/logs/*.log | grep -E "ERROR|FATAL"

4️⃣ 资源使用检查

# CPU/内存占用
top -l 1 | grep -E "hermes|openclaw|node"

# 磁盘空间
df -h ~/.hermes ~/.openclaw

5️⃣ 定时任务检查

# 检查cron任务是否正常执行
crontab -l | grep hermes

# 检查最近执行记录
log show --predicate 'process == "cron"' --last 1h

异常分级

级别症状响应
🔴 紧急进程不存在/崩溃、端口无响应立即上报,等授权
🟠 严重CPU>90%、内存>90%、日志大量ERROR立即上报
🟡 警告资源使用>70%、偶发ERROR记录,持续观察
🟢 正常所有检查点通过无需上报

监控报告格式

## 🩺 系统健康审计报告

**时间**:YYYY-MM-DD HH:mm:ss
**审计官**:书昕

### 进程状态
| 进程 | 状态 | PID | CPU | 内存 |
|------|------|-----|-----|------|
| hermes-gateway | 🟢 正常 | XXXX | X% | X% |
| hermes-agent | 🟢 正常 | XXXX | X% | X% |
| openclaw | 🟡 警告 | XXXX | X% | X% |

### 端口检查
| 端口 | 服务 | 状态 | 响应码 |
|------|------|------|--------|
| 18999 | Hermes | 🟢 正常 | 200 |
| 18789 | OpenClaw | 🟢 正常 | 200 |

### 日志异常
- ERROR: 0
- WARN: 3 (已自动恢复)

### 资源使用
- CPU: 12%
- 内存: 34%
- 磁盘: 45%

### 综合评估
🟢 **系统健康** - 无需干预

上报触发条件

以下情况必须立即上报:

  1. 任何关键进程不存在
  2. 端口无法连通(连续3次重试)
  3. 日志出现FATAL或大量ERROR
  4. CPU/内存持续>90%超过5分钟
  5. 磁盘空间<10%

注意事项

  1. 先检查,后上报:执行完整检查清单再上报
  2. 保留证据:日志片段、截图作为附件
  3. 提供建议:上报时附带可能的解决方向
  4. 追踪闭环:问题解决后确认恢复

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.