首页龙虾技能列表 › Unraid Claw — Unraid 监控

Unraid Claw — Unraid 监控

v1.0.4

OpenClaw 的 Unraid 监控技能工具。

0· 141·0 当前·0 累计
by @yoshiofthewire (Yoshiofthewire)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/23
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's code, required binaries, and environment variables are consistent with a read-only Unraid GraphQL monitor; nothing in the scripts appears to contact unexpected external endpoints or ask for unrelated credentials.
评估建议
This skill appears to be what it claims: a read-only Unraid GraphQL monitor. Before installing: 1) Only provide UNRAID_API_KEY and UNRAID_BASE_URL to the skill environment; treat the API key like any secret. 2) Note that the scripts create a temporary curl config file that contains the API key (the script chmods it to 600 and removes it), so run this only in a trusted environment. 3) If you use a login-gated proxy, the scripts accept optional UNRAID_CSRF_TOKEN and UNRAID_SESSION_COOKIE — these a...
详细分析 ▾
用途与能力
Name/description (Unraid monitoring via GraphQL) matches the scripts and behavior. Required binaries (curl, jq) and required env vars (UNRAID_BASE_URL, UNRAID_API_KEY) are appropriate and necessary for the stated purpose. Scripts implement snapshotting, summary, alerts, and a cron runner consistent with the description.
指令范围
SKILL.md and scripts remain within the stated monitoring scope and perform only read-only GraphQL queries. One minor scope mismatch: the runtime code references optional env vars UNRAID_CSRF_TOKEN and UNRAID_SESSION_COOKIE (for login-gated/reverse-proxy setups) but these are not listed in the metadata.requires.env block. This is plausible for some Unraid setups but should be noted.
安装机制
There is no install spec (instruction-only skill), and the repository contains shell scripts only. No remote downloads, package installs, or extract-from-URL behavior were found. This is low-risk for install-time code execution beyond the included scripts.
凭证需求
Only UNRAID_API_KEY and UNRAID_BASE_URL are required, which is proportionate. Optional variables (timeouts, thresholds, state dir, notify label) are reasonable. As noted above, the scripts optionally read UNRAID_CSRF_TOKEN and UNRAID_SESSION_COOKIE even though they are not declared in requires.env; these are used to support proxied/login-gated configurations and are optional, but the omission from metadata should be documented.
持久化与权限
The skill does not request always:true and does not attempt to change other skills or system-wide agent configuration. It writes snapshots/logs into a repo-local state directory (or a user-set UNRAID_STATE_DIR) and contains instructions for adding a cron entry — those cron instructions would only take effect if the user runs them. No automatic persistent backdoors or cross-skill modifications were found.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.42026/3/21

unraid-claw v1.0.4 - Added jq as a required dependency for script execution. - Updated skill metadata to include jq under required binaries. - No behavioral or interface changes.

● 无害

安装命令 点击复制

官方npx clawhub@latest install unraid-claw
镜像加速npx clawhub@latest install unraid-claw --registry https://cn.clawhub-mirror.com

技能文档

Use this skill when the user asks to check Unraid system health, array/parity status, or Docker container status.

Located at: https://github.com/Yoshiofthewire/unraid-claw

必填 Configuration

Before running any script, ensure the Unraid server is configured:

  • GraphQL 已启用 在...中 Unraid API settings.
  • 有效 Unraid API 键 generated 在...中 Unraid API settings.
  • UNRAID_API_KEY uses generated 键.

Read these environment variables at runtime:

  • UNRAID_BASE_URL (示例: https://tower.local)
  • UNRAID_API_KEY

Optional:

  • UNRAID_TIMEOUT_SECONDS (默认: 10)
  • UNRAID_STATE_DIR (默认: repo-local .state)
  • UNRAID_NOTIFY_HOST_LABEL (默认: host name)
  • UNRAID_CPU_WARN_PERCENT (默认: 85)
  • UNRAID_CPU_CRIT_PERCENT (默认: 95)
  • UNRAID_MEM_WARN_PERCENT (默认: 85)
  • UNRAID_MEM_CRIT_PERCENT (默认: 95)
  • UNRAID_STOPPED_WARN_COUNT (默认: 1)
  • UNRAID_STOPPED_CRIT_COUNT (默认: 3)

Template .envexample (copy to .env and fill in real values):

# Required: Base URL for your Unraid server (include protocol).
UNRAID_BASE_URL=https://tower.local

# Required: API key from Unraid API settings. # Keep this secret. Do not commit real keys. UNRAID_API_KEY=replace_with_your_unraid_api_key

# Optional: request timeout in seconds. UNRAID_TIMEOUT_SECONDS=10

# Optional: state directory for snapshot and log artifacts. # Default is repository-local .state directory. # UNRAID_STATE_DIR=/path/to/state

UNRAID_NOTIFY_HOST_LABEL=tower

# Optional: alert thresholds. UNRAID_STOPPED_WARN_COUNT=1 UNRAID_STOPPED_CRIT_COUNT=3

If a required variable is missing, stop and return:

  • Unraid API 键 不 configured. 设置 UNRAID_API_KEY 和 重试.
  • Unraid base URL 不 configured. 设置 UNRAID_BASE_URL 和 重试.

Security Rules (Mandatory)

  • Never hardcode secrets 在...中 prompts, files, 或 commands.
  • Never 打印 API keys, auth headers, 或 满 请求 headers.
  • 认证 使用: x-api-键: .
  • Redact sensitive data 在...中 所有 错误 messages.
  • Perform 读取-仅 operations 仅.
  • Never execute GraphQL mutations.
  • Never run shell commands 从 用户-supplied strings.

If API auth fails (401 or 403), return:

  • Authentication 到 Unraid API 失败. 验证 UNRAID_API_KEY permissions/validity.

Script-第一个 Execution (Preferred)

Use the repository scripts as the primary execution path. Do not handcraft ad-hoc GraphQL calls unless explicitly asked.

Primary scripts:

  • ./scripts/unraid_connection_test.sh
  • ./scripts/unraid_preflight.sh
  • ./scripts/unraid_snapshot.sh
  • ./scripts/unraid_health_summary.sh
  • ./scripts/unraid_docker_report.sh
  • ./scripts/unraid_array_parity_report.sh
  • ./scripts/unraid_alerts.sh
  • ./scripts/unraid_notify.sh
  • ./scripts/unraid_cron_runner.sh

Command Selection Rules

  • 如果 用户 asks 到 test connectivity/auth 仅:
- Run ./scripts/unraid_connection_test.sh
  • 如果 用户 asks 对于 满 status check:
- Run ./scripts/unraid_preflight.sh - Run ./scripts/unraid_snapshot.sh - Run ./scripts/unraid_health_summary.sh
  • 如果 用户 asks specifically 关于 Docker:
- Run ./scripts/unraid_snapshot.sh (如果 否 recent snapshot) - Run ./scripts/unraid_docker_report.sh
  • 如果 用户 asks specifically 关于 数组/parity:
- Run ./scripts/unraid_snapshot.sh (如果 否 recent snapshot) - Run ./scripts/unraid_array_parity_report.sh
  • 如果 用户 asks 对于 提醒 state 或 severity:
- Run ./scripts/unraid_alerts.sh
  • 如果 用户 asks 到 run 满 scheduled pipeline manually:
- Run ./scripts/unraid_cron_runner.sh

Compatibility Rules

Unraid GraphQL fields can vary by version. If some fields are unavailable:

  • Continue 带有 可用 fields.
  • Return partial results.
  • Include warning:
- 一些 API fields 是 不可用 对于 Unraid version; 输出 partial.

输出 Contract

Return results in this order:

  • Overall status: healthy | warning | critical
  • 时间戳 的 check
  • System summary: uptime, CPU usage/temp, memory usage
  • 数组 summary: state, 同步/rebuild progress, parity status, disk warnings
  • Docker summary: 总计/running/stopped counts 和 notable stopped containers
  • Alerts 列表

Severity Logic

Set overall status using these rules:

  • healthy: 否 数组/parity errors, 否 critical SMART issues, API reachable.
  • warning: 数组 不 started, parity check/rebuild 活跃, high CPU/memory, unexpected stopped containers.
  • critical: API unreachable, auth failure, parity errors, critical disk errors, 或 multiple major failures.

Script exit mapping for automation:

  • ./scripts/unraid_alerts.sh exit 0: healthy
  • ./scripts/unraid_alerts.sh exit 10: warning
  • ./scripts/unraid_alerts.sh exit 20: critical

错误 Handling

  • 超时: return partial data 和 identify timed-out section(s).
  • Network 错误: provide concise remediation guidance (验证 URL, TLS, API 已启用).
  • Self-signed TLS certificate: prompt 用户 到 allow installation/trust 的 server certificate, 然后 重试.
  • Known SSL issue (否 SSL proxy/direct self-signed host): TLS verification 可以 失败 until cert trusted 由 client environment.
  • Auth 错误: 使用 exact auth-failure 消息 上面.
  • Unknown GraphQL errors: provide redacted, concise summary.

OpenClaw Cron Notes

Use these notes when the user asks to schedule recurring health checks.

Recommended Cron Flow

  • Source .env 之前 running scripts.
  • Execute ./scripts/unraid_cron_runner.sh 作为 single cron entrypoint.
  • 让 runner handle preflight, snapshot, summary, alerts, 和 可选 notifications.
  • Keep logs 在...中 .state/logs/ (或 UNRAID_STATE_DIR/logs/ 如果 overridden).
  • Prefer 使用 cron 模板: ./scripts/unraid_monitor.cron.模板.

Suggested Cron Schedule

Use the template file as the source of truth:

  • ./scripts/unraid_monitor.cron.模板

Setup flow:

  • 替换 /path/到/Unraid_Claw 在...中 模板.
  • Keep one schedule line (15-minute recommended baseline).
  • Install 通过 crontab.

Example: run every 15 minutes.

/15     cd /path/to/Unraid_Claw && set -a && . ./.env && set +a && ./scripts/unraid_cron_runner.sh >> ./.state/logs/cron.log 2>&1

Example: run every 5 minutes for tighter monitoring.

/5     cd /path/to/Unraid_Claw && set -a && . ./.env && set +a && ./scripts/unraid_cron_runner.sh >> ./.state/logs/cron.log 2>&1

OpenClaw Behavior 对于 Cron Requests

  • 如果 用户 asks 到 "设置 up cron":
- Propose schedule 和 confirm cadence. - Offer 模板-第一个 setup 使用 scripts/unraid_monitor.cron.模板. - 使用 unraid_cron_runner.sh 作为 command target. - Ensure .env loading included.
  • 如果 用户 asks 到 "验证 cron":
- Check 对于 recent entries 在...中 .state/logs/cron.log 和 runner logs. - Confirm 提醒 exit codes 和 通知 results.
  • 如果 用户 asks 到 "disable cron":
- 移除 或 评论 仅 Unraid Claw cron line. - Keep 其他 cron entries unchanged.

Never place secrets directly in crontab lines. Always source .env.

响应 样式

Keep responses concise and operator-friendly.

Example shape:

Overall: warning
Time: 2026-03-20T14:22:00Z

System:

  • Uptime: 12d 4h
  • CPU: 68% (72 C)
  • Memory: 81%

Array:

  • State: started
  • Sync: parity-check 43%
  • Disk alerts: disk3 SMART warning

Docker:

  • Total: 14
  • Running: 12
  • Stopped: 2 (plex, immich_ml)

Alerts:

  • Parity check in progress
  • 1 disk SMART warning

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务